* {
  box-sizing: border-box;
}

html {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

html.schedule-dialog-open {
  overflow: hidden;
}

body {
  min-width: 320px;
  min-height: 100vh;
  height: auto;
  margin: 0;
  overflow: visible;
  color: #293a33;
  background:
    radial-gradient(ellipse at 82% 0%, rgba(218, 237, 225, 0.62), transparent 34rem),
    linear-gradient(145deg, #f7faf8 0%, #f1f6f3 60%, #f8f8f5 100%);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.self-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  height: 60px;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid rgba(220, 232, 225, 0.9);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 5px 24px rgba(37, 75, 61, 0.055);
}

.self-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #263b35;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.self-brand-mark {
  display: block;
  width: 48px;
  height: 48px;
  overflow: visible;
}

.self-page {
  display: grid;
  width: 100%;
  grid-template-columns: 220px minmax(0, 1fr);
  align-items: start;
  justify-content: start;
  gap: 28px;
  margin: 34px 0;
}

.self-sidebar {
  position: sticky;
  display: flex;
  flex-direction: column;
  top: 60px;
  height: calc(100vh - 60px);
  min-height: 0;
  overflow: hidden;
  margin-top: -34px;
  margin-bottom: -34px;
  padding: 24px 12px;
  border: 1px solid rgba(221, 232, 225, 0.92);
  border-left: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 12px 30px rgba(28, 66, 52, 0.055);
}

.self-sidebar::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 9px;
  background: linear-gradient(180deg, rgba(44, 71, 58, 0.1), rgba(44, 71, 58, 0.035) 35%, transparent);
  content: "";
  pointer-events: none;
}

.self-sidebar-title {
  margin: 0 0 14px 10px;
  color: #8a9b92;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
}

.self-sidebar-nav {
  display: grid;
  gap: 7px;
}

.self-sidebar-link {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #687a71;
  font-size: 15px;
  font-weight: 400;
  text-decoration: none;
  transition:
    color 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.self-sidebar-link:hover,
.self-sidebar-link[aria-current="location"] {
  border-color: #d7e9de;
  background: #edf6f0;
  color: #28745c;
}

.self-sidebar-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 9px rgba(38, 91, 69, 0.1);
}

.self-sidebar-link[aria-current="location"]:hover {
  box-shadow: inset 3px 0 #32846d, 0 4px 9px rgba(38, 91, 69, 0.1);
}

.self-sidebar-link[aria-current="location"] {
  box-shadow: inset 3px 0 #32846d;
  font-weight: 700;
}

.self-sidebar-link svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.self-sidebar-link[aria-current="location"] svg {
  stroke-width: 2.2;
}

.self-sidebar-link:focus-visible {
  outline: 3px solid rgba(52, 127, 103, 0.35);
  outline-offset: 2px;
}

.self-sidebar-home {
  display: grid;
  width: 190px;
  min-height: 48px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  align-self: center;
  margin-top: auto;
  padding: 0 10px;
  border: 1px solid #27765f;
  border-radius: 11px;
  background: linear-gradient(110deg, #2d8069, #216d58);
  box-shadow: 0 5px 12px rgba(34, 111, 87, 0.2);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.self-sidebar-home:hover {
  background: linear-gradient(110deg, #287a63, #1d604e);
  box-shadow: 0 7px 15px rgba(34, 111, 87, 0.25);
}

.self-sidebar-home svg {
  width: 16px;
  height: 16px;
  justify-self: start;
  margin-left: 7px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.self-sidebar-home:focus-visible {
  outline: 3px solid rgba(52, 127, 103, 0.35);
  outline-offset: 3px;
}

.self-sidebar-home span {
  grid-column: 2;
  white-space: nowrap;
}

.self-panel {
  width: min(calc(100% - 48px), 1120px);
  justify-self: center;
  transform: translateX(-10px);
  min-width: 0;
  overflow: hidden;
  padding: 25px 28px 22px;
  border: 1px solid rgba(221, 232, 225, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(28, 66, 52, 0.065);
}

.self-basic-page {
  width: min(calc(100% - 48px), 1120px);
  justify-self: center;
  transform: translateX(-10px);
  min-width: 0;
  padding: 25px 28px 28px;
  border: 1px solid rgba(221, 232, 225, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(28, 66, 52, 0.065);
}

.self-basic-page[hidden] {
  display: none;
}

.self-schedule-page {
  width: min(100%, 1280px);
  justify-self: center;
  transform: translateX(-8px);
  min-width: 0;
}

.self-schedule-page[hidden] {
  display: none;
}

.self-schedule-status {
  min-height: 18px;
  margin: 10px 0 0;
  color: #718079;
  font-size: 13px;
}

.self-schedule-status:empty {
  display: none;
}

.self-calendar {
  overflow: hidden;
  border: 1px solid #e1ebe5;
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 34px rgba(28, 66, 52, 0.065);
}

.self-calendar-toolbar {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid #dfeae3;
}

.self-calendar-month-controls {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.self-calendar-title {
  min-width: 145px;
  margin: 0;
  color: #293d35;
  font-size: 21px;
  font-weight: 750;
  text-align: center;
}

.self-calendar-nav,
.self-calendar-today {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #d9e8df;
  border-radius: 11px;
  background: linear-gradient(180deg, #fff, #f5faf7);
  box-shadow: 0 2px 6px rgba(35, 73, 58, 0.08);
  color: #39755f;
  cursor: pointer;
}

.self-calendar-nav:hover,
.self-calendar-today:hover {
  border-color: #b7d2c3;
  background: #edf6f0;
}

.self-calendar-nav:focus-visible,
.self-calendar-today:focus-visible,
.self-calendar-day:focus-visible {
  outline: 3px solid rgba(52, 134, 108, 0.25);
  outline-offset: 2px;
}

.self-calendar-nav svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.self-calendar-today {
  min-width: 62px;
  padding: 0 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
}

.self-calendar-weekdays,
.self-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.self-calendar-grid.is-month-transitioning {
  animation-duration: 280ms;
  animation-timing-function: ease-out;
  animation-fill-mode: both;
}

.self-calendar-grid.is-month-transitioning-previous {
  animation-name: calendar-month-from-left;
}

.self-calendar-grid.is-month-transitioning-next {
  animation-name: calendar-month-from-right;
}

@keyframes calendar-month-from-left {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendar-month-from-right {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.self-calendar-weekdays {
  min-height: 40px;
  align-items: center;
  border-bottom: 1px solid #dfeae3;
  background: #f2f7f4;
  color: #647a6e;
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.self-calendar-weekdays span + span {
  border-left: 1px solid #e0ebe4;
}

.self-calendar-grid {
  grid-auto-rows: minmax(clamp(64px, calc((100vh - 260px) / 6), 104px), 1fr);
}

.self-calendar-day {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 0;
  align-items: flex-start;
  padding: 8px;
  border: 0;
  border-right: 1px solid #e2ece6;
  border-bottom: 1px solid #e2ece6;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(244, 249, 246, 0.72));
  color: #344a40;
  text-align: left;
  cursor: pointer;
  flex-wrap: wrap;
  align-content: flex-start;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.self-calendar-day:nth-child(7n) {
  border-right: 0;
}

.self-calendar-day:hover {
  background: linear-gradient(145deg, #fbfefc, #edf6f0);
}

.self-calendar-day.is-outside-month {
  background: linear-gradient(145deg, #f7faf8, #eef3f0);
  color: #a6b5ad;
}

.self-calendar-day.is-today {
  background: linear-gradient(145deg, #f7fbf8, #eaf4ee);
  box-shadow: inset 0 0 0 1px #b8d7c6;
}

.self-calendar-day.is-selected {
  z-index: 1;
  background: linear-gradient(145deg, #f3f9f5, #e5f1e9);
  box-shadow: inset 0 0 0 2px #28745c;
}

.self-calendar-day-number {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid #e4eee8;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(38, 76, 59, 0.08);
  font-size: 14px;
  font-weight: 700;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.self-calendar-day.is-outside-month .self-calendar-day-number {
  background: #f8faf8;
}

.self-calendar-day.is-selected .self-calendar-day-number {
  border-color: #32846d;
  background: #32846d;
  box-shadow: 0 3px 8px rgba(38, 116, 95, 0.24);
  color: #fff;
  transform: scale(1.04);
}

.self-calendar-today-mark {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #32846d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
}

.self-calendar-events {
  display: block;
  width: 100%;
  max-height: 52px;
  min-height: 0;
  overflow: hidden;
}

.self-calendar-events.has-overflow {
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #aeb8b2 transparent;
  scrollbar-width: thin;
}

.self-calendar-events.has-overflow::-webkit-scrollbar {
  width: 4px;
}

.self-calendar-events.has-overflow::-webkit-scrollbar-thumb {
  border-radius: 4px;
  background: #aeb8b2;
}

.self-calendar-event {
  display: block;
  width: 100%;
  overflow: hidden;
  margin-top: 5px;
  padding: 3px 5px;
  border-radius: 5px;
  border-left: 3px solid #d88a25;
  background: #fff0cf;
  color: #805415;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.self-calendar-event.is-overdue {
  border-left-color: #d64545;
  background: #ffe2e0;
  color: #b52f35;
}

.self-calendar-event.is-completed {
  border-left-color: #3b9a68;
  background: #dff3e6;
  color: #2f8055;
}

.self-calendar-event.is-overdue.is-completed {
  border-left-color: #7d858d;
  background: #dfe2e5;
  color: #68717a;
}

.self-basic-page > .self-title {
  margin-bottom: 20px;
}

.self-basic-status {
  margin: 0 0 14px;
  color: #718079;
  font-size: 13px;
}

.self-basic-status:empty {
  display: none;
}

.self-basic-settings {
  display: grid;
  gap: 16px;
}

.self-setting-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 24px;
  border: 1px solid #e1ebe5;
  border-radius: 14px;
  background: #fbfdfc;
}

.self-setting-heading h2 {
  margin: 0;
  color: #30453b;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.self-setting-card--avatar {
  gap: 16px;
}

.self-avatar-setting {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: stretch;
}

.self-avatar-preview {
  position: relative;
  display: grid;
  width: min(320px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px dashed #b9d2c3;
  border-radius: 22px;
  background: linear-gradient(145deg, #e8f3ed, #cfe5d8);
  color: #26745f;
  font: inherit;
  font-size: 68px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.self-avatar-preview:hover,
.self-avatar-preview:focus-visible {
  border-color: #34866c;
  outline: none;
  box-shadow: 0 0 0 4px rgba(52, 134, 108, 0.12);
}

.self-avatar-preview:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.self-avatar-preview img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.self-avatar-preview img[hidden] {
  display: none;
}

.self-avatar-fallback {
  pointer-events: none;
}

.self-avatar-change-overlay {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  min-height: 72px;
  place-items: center;
  background: linear-gradient(transparent, rgba(21, 45, 35, 0.78));
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.self-avatar-preview:hover .self-avatar-change-overlay,
.self-avatar-preview:focus-visible .self-avatar-change-overlay {
  opacity: 1;
}

.self-avatar-actions {
  display: grid;
  min-width: 0;
  align-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  border-left: 2px solid #cbd9d0;
}

.self-avatar-actions .self-setting-feedback {
  text-align: center;
}

.self-setting-form {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
}

.self-setting-form input {
  width: 100%;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #dce6df;
  border-radius: 10px;
  background: #fff;
  color: #263a31;
  font: inherit;
  font-size: 14px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.self-setting-form input:focus {
  border-color: #34866c;
  outline: none;
  box-shadow: 0 0 0 3px rgba(52, 134, 108, 0.13);
}

.self-setting-form input:disabled {
  background: #f6f8f7;
}

.self-password-form {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.4fr);
}

.self-password-fields {
  display: grid;
  min-width: 0;
  grid-template-columns: 110px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 10px 12px;
}

.self-password-actions {
  display: grid;
  min-width: 0;
  align-self: stretch;
  align-content: center;
  justify-items: center;
  gap: 12px;
  margin-left: 12px;
  padding-left: 24px;
  border-left: 2px solid #cbd9d0;
}

.self-password-form label {
  color: #52665d;
  font-size: 13px;
  font-weight: 600;
}

.self-setting-button {
  min-width: 130px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  background: #32886f;
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  box-shadow: 0 9px 18px rgba(38, 111, 87, 0.2);
  transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.self-setting-button:hover:not(:disabled) {
  background: #2d7d66;
  box-shadow: 0 10px 20px rgba(38, 111, 87, 0.24);
}

.self-setting-button:active:not(:disabled) {
  background: #286f5b;
  box-shadow: 0 5px 12px rgba(38, 111, 87, 0.18);
}

.self-setting-button:focus-visible {
  outline: 3px solid rgba(52, 134, 108, 0.22);
  outline-offset: 3px;
}

.self-setting-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  box-shadow: 0 6px 12px rgba(38, 111, 87, 0.12);
}

.self-setting-button--secondary {
  border: 1px solid #cbded2;
  background: #f7fbf8;
  color: #28745c;
  box-shadow: 0 6px 14px rgba(43, 83, 64, 0.1);
}

.self-setting-button--secondary:hover:not(:disabled) {
  border-color: #8db9a0;
  background: #eef6f1;
  box-shadow: 0 8px 16px rgba(43, 83, 64, 0.14);
}

.self-setting-feedback {
  min-height: 16px;
  grid-column: 1 / -1;
  margin: 0;
  color: #718079;
  font-size: 12px;
  line-height: 1.5;
}

.self-password-actions .self-setting-feedback {
  grid-column: 1;
  text-align: center;
}

.self-password-actions .self-setting-feedback[data-state="error"] {
  color: #c33f3f;
}

.self-password-actions .self-setting-feedback[data-state="success"] {
  color: #28745c;
}

.self-title {
  margin: 0 0 18px;
  color: #253330;
  font-size: 20px;
  font-weight: 650;
}

.self-card {
  position: relative;
  margin: 0 -28px;
  overflow: hidden;
  background: #f4f8f5;
}

.self-cover {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background:
    linear-gradient(180deg, #d7e4dc, #a8c3b4);
  cursor: pointer;
}

.self-cover:disabled {
  cursor: wait;
}

.self-cover:focus-visible {
  outline: 3px solid #347f67;
  outline-offset: -5px;
}

.self-cover::before {
  position: absolute;
  inset: -8px;
  background:
    radial-gradient(ellipse at 76% 10%, rgba(255, 255, 230, 0.83), transparent 23%),
    linear-gradient(180deg, #c8dcd5 0%, #d7e4dc 43%, #a8c3b4 44%, #7e9f88 70%, #527864 100%);
  content: "";
  pointer-events: none;
}

.self-cover::after {
  position: absolute;
  right: 18px;
  top: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  background: rgba(32, 75, 58, 0.62);
  color: #fff;
  content: "点击更换背景图片";
  font: 600 12px/1.2 "Microsoft YaHei", "PingFang SC", sans-serif;
  opacity: 0.78;
  pointer-events: none;
  transform: translateY(3px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.self-cover:hover::after,
.self-cover:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.self-cover-photo {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  isolation: isolate;
  background-position: center;
  background-size: cover;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 2%,
    rgba(0, 0, 0, 0.75) 5%,
    #000 9%,
    #000 91%,
    rgba(0, 0, 0, 0.75) 94%,
    rgba(0, 0, 0, 0.2) 97%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.2) 2%,
    rgba(0, 0, 0, 0.75) 5%,
    #000 9%,
    #000 91%,
    rgba(0, 0, 0, 0.75) 94%,
    rgba(0, 0, 0, 0.2) 97%,
    transparent 100%
  );
  mask-mode: alpha;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.self-cover-photo::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgba(255, 255, 255, 0.38);
  content: "";
  pointer-events: none;
}

.self-cover.has-custom-background {
  background: #fff;
}

.self-cover.has-custom-background .self-cover-photo {
  opacity: 1;
}

.self-cover.has-custom-background::before,
.self-cover.has-custom-background .self-cover-mountains,
.self-cover.has-custom-background .self-cover-forest,
.self-cover.has-custom-background .self-cover-lake {
  opacity: 0;
}

.self-cover-mountains {
  position: absolute;
  z-index: 1;
  inset: 16% 0 16%;
  background:
    linear-gradient(148deg, transparent 0 29%, rgba(76, 115, 91, 0.66) 29.2% 48%, transparent 48.2%) left bottom / 58% 100% no-repeat,
    linear-gradient(215deg, transparent 0 35%, rgba(61, 104, 79, 0.68) 35.2% 55%, transparent 55.2%) right bottom / 68% 100% no-repeat,
    linear-gradient(151deg, transparent 0 41%, rgba(130, 160, 130, 0.75) 41.2% 57%, transparent 57.2%) 20% bottom / 57% 92% no-repeat,
    linear-gradient(218deg, transparent 0 38%, rgba(119, 152, 125, 0.78) 38.2% 54%, transparent 54.2%) 78% bottom / 60% 90% no-repeat;
}

.self-cover-forest {
  position: absolute;
  right: 0;
  bottom: 20%;
  left: 0;
  height: 42%;
  opacity: 0.75;
  background:
    linear-gradient(135deg, transparent 48%, #365f49 49% 62%, transparent 63%) 4% 100% / 36px 62px repeat-x,
    linear-gradient(225deg, transparent 48%, #416c50 49% 62%, transparent 63%) 22% 100% / 42px 72px repeat-x;
}

.self-cover-lake {
  position: absolute;
  right: -5%;
  bottom: 0;
  left: -5%;
  height: 34%;
  background:
    linear-gradient(180deg, rgba(226, 238, 226, 0.25), rgba(221, 237, 226, 0.88)),
    repeating-linear-gradient(176deg, transparent 0 11px, rgba(255, 255, 255, 0.25) 12px 13px, transparent 14px 23px);
  clip-path: polygon(0 21%, 22% 4%, 44% 17%, 68% 0, 100% 14%, 100% 100%, 0 100%);
}

.self-card-content {
  position: relative;
  z-index: 1;
  padding: 52px 28px 19px;
  pointer-events: none;
}

.self-cover-status {
  margin: 8px 0 0;
  color: #526b5e;
  font-size: 11px;
}

.self-cover-status:empty {
  display: none;
}

.self-signature input,
.self-signature button {
  pointer-events: auto;
}

.self-identity-card {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.self-avatar {
  display: grid;
  width: 128px;
  height: 128px;
  place-items: center;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 26px;
  background: linear-gradient(145deg, #e8f3ed, #cfe5d8);
  color: #26745f;
  font-size: 38px;
  font-weight: 700;
  box-shadow: 0 5px 16px rgba(38, 116, 95, 0.15), 0 0 0 1px #cfe1d6;
}

.self-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.self-avatar img[hidden],
.self-avatar [hidden] {
  display: none;
}

.self-profile {
  display: grid;
  min-width: 0;
  gap: 20px;
}

.self-name-row {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 13px;
}

.self-username {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #263c32;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.self-role {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 7px;
  border: 1px solid #c9e2d2;
  border-radius: 999px;
  background: #edf8f1;
  color: #32825e;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.self-role.role-guest {
  border-color: #b7dfc4;
  background: #edf9f0;
  color: #2f8a4c;
}

.self-role.role-member {
  border-color: #b7cfee;
  background: #eef4ff;
  color: #356fc0;
}

.self-role.role-admin {
  border-color: #ead09a;
  background: #fff7df;
  color: #c48718;
}

.self-role svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.self-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
}

.self-progress-wrap {
  position: relative;
  min-width: 0;
}

.self-progress-label {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  color: #50665b;
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.self-progress {
  height: 16px;
  overflow: hidden;
  border: 1px solid #dce9e1;
  border-radius: 999px;
  background: #edf3ef;
}

.self-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #64ae83, #34866c);
}

.self-level {
  display: grid;
  min-width: 70px;
  justify-items: center;
  gap: 3px;
  color: #50665b;
  font-size: 11px;
  font-weight: 650;
}

.self-level-badge {
  width: 40px;
  height: 40px;
  overflow: visible;
  filter: drop-shadow(0 3px 5px rgba(37, 75, 61, 0.2));
}

.self-level-shadow {
  fill: var(--level-shadow);
}

.self-level-shell {
  fill: var(--level-base);
  stroke: var(--level-edge);
  stroke-width: 1.5;
  stroke-linejoin: round;
}

.self-level-inner {
  fill: var(--level-shade);
  stroke: var(--level-highlight);
  stroke-opacity: 0.8;
  stroke-width: 0.8;
  stroke-linejoin: round;
}

.self-level-facet {
  fill: var(--level-highlight);
  opacity: 0.58;
}

.self-level-number {
  fill: #fff;
  stroke: var(--level-shade);
  stroke-width: 0.7;
  paint-order: stroke;
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  font-weight: 800;
}

.self-level.tier-1 {
  --level-base: #728a7c;
  --level-shade: #455e51;
  --level-edge: #c4d5c8;
  --level-highlight: #e4efe3;
  --level-shadow: #344a3c;
}

.self-level.tier-2 {
  --level-base: #3c9875;
  --level-shade: #24674f;
  --level-edge: #a9ddbd;
  --level-highlight: #d3f0d9;
  --level-shadow: #194f3c;
}

.self-level.tier-3 {
  --level-base: #338da1;
  --level-shade: #205c71;
  --level-edge: #a4dce0;
  --level-highlight: #d3f0ec;
  --level-shadow: #174657;
}

.self-level.tier-4 {
  --level-base: #467ec1;
  --level-shade: #2b5188;
  --level-edge: #b5d3f5;
  --level-highlight: #e0efff;
  --level-shadow: #203d6b;
}

.self-level.tier-5 {
  --level-base: #7069bd;
  --level-shade: #494287;
  --level-edge: #d0c5f3;
  --level-highlight: #eee5ff;
  --level-shadow: #383265;
}

.self-level.tier-6 {
  --level-base: #9a5bb5;
  --level-shade: #683b83;
  --level-edge: #e2b9ec;
  --level-highlight: #f5dcfb;
  --level-shadow: #512e68;
}

.self-level.tier-7 {
  --level-base: #c15386;
  --level-shade: #853958;
  --level-edge: #f0bdd6;
  --level-highlight: #ffe2ed;
  --level-shadow: #682b49;
}

.self-level.tier-8 {
  --level-base: #d56a4c;
  --level-shade: #98462f;
  --level-edge: #f4c2a8;
  --level-highlight: #ffe5d4;
  --level-shadow: #71341f;
}

.self-level.tier-9 {
  --level-base: #d29432;
  --level-shade: #93601f;
  --level-edge: #f4d28c;
  --level-highlight: #fff0c4;
  --level-shadow: #6d4818;
}

.self-level.tier-10 {
  --level-base: #b98728;
  --level-shade: #79551b;
  --level-edge: #f6df9e;
  --level-highlight: #fff4cf;
  --level-shadow: #594016;
}

.self-signature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 24px 0 0;
}

.self-signature input {
  width: 100%;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid #dce9e1;
  border-radius: 9px;
  background: rgba(251, 253, 252, 0.94);
  color: #35483f;
  font: inherit;
  font-size: 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.self-signature input::placeholder {
  color: #9aa69f;
}

.self-signature input:focus {
  border-color: #80b39c;
  outline: none;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(52, 134, 108, 0.1);
}

.self-signature button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #6fa88b;
  border-radius: 9px;
  background: linear-gradient(145deg, #f8fcf9, #e4f1e9);
  color: #28745c;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.self-signature button:hover {
  border-color: #428365;
  background: #e5f3ea;
  box-shadow: 0 4px 10px rgba(52, 134, 108, 0.14);
  transform: translateY(-1px);
}

.self-signature button:focus-visible,
.self-home-link:focus-visible,
.self-brand:focus-visible {
  outline: 3px solid rgba(52, 134, 108, 0.22);
  outline-offset: 3px;
}

.self-signature-status {
  grid-column: 1 / -1;
  min-height: 16px;
  margin: 0;
  color: #718079;
  font-size: 11px;
}

.self-page-status {
  margin: 10px 0 0 172px;
  color: #718079;
  font-size: 12px;
}

.self-page-status:empty {
  display: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 640px) {
  .self-topbar {
    height: 54px;
    min-height: 54px;
    padding: 0 14px;
  }

  .self-brand {
    font-size: 18px;
  }

  .self-brand-mark {
    width: 40px;
    height: 40px;
  }

  .self-page {
    width: min(100% - 24px, 1120px);
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    margin: 20px auto;
  }

  .self-sidebar {
    position: static;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 10px;
    border-left: 1px solid rgba(221, 232, 225, 0.92);
    border-radius: 13px;
  }

  .self-sidebar::before {
    display: none;
  }

  .self-sidebar-title {
    margin: 0 0 7px 6px;
  }

  .self-sidebar-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .self-sidebar-home {
    width: min(190px, 100%);
    min-height: 48px;
    margin-top: 10px;
    font-size: 14px;
  }

  .self-sidebar-link {
    min-height: 42px;
    justify-content: center;
    gap: 7px;
    padding: 0 8px;
    font-size: 14px;
  }

  .self-panel {
    width: 100%;
    transform: none;
    left: 0;
    padding: 19px 18px 16px;
    border-radius: 15px;
  }

  .self-basic-page {
    width: 100%;
    transform: none;
    padding: 19px 18px 16px;
    border-radius: 15px;
  }

  .self-schedule-page {
    width: 100%;
    transform: none;
  }

  .self-calendar-toolbar {
    min-height: 62px;
    gap: 8px;
    padding: 9px 10px;
  }

  .self-calendar-month-controls {
    gap: 8px;
  }

  .self-calendar-title {
    min-width: 112px;
    font-size: 17px;
  }

  .self-calendar-nav {
    min-width: 36px;
    height: 36px;
  }

  .self-calendar-today {
    min-width: 52px;
    height: 36px;
    padding: 0 8px;
    font-size: 13px;
  }

  .self-calendar-weekdays {
    min-height: 34px;
    font-size: 12px;
  }

  .self-calendar-grid {
    grid-auto-rows: minmax(clamp(48px, calc((100dvh - 190px) / 6), 72px), 1fr);
  }

  .self-calendar-day {
    min-height: 0;
    padding: 5px;
  }

  .self-calendar-day-number {
    width: 27px;
    height: 27px;
    font-size: 12px;
  }

  .self-setting-card {
    gap: 14px;
    padding: 16px;
  }

  .self-avatar-preview {
    width: min(100%, 220px);
    border-radius: 20px;
    font-size: clamp(32px, 15vw, 68px);
  }

  .self-avatar-change-overlay {
    min-height: 56px;
    font-size: 13px;
  }

  .self-avatar-actions {
    padding: 12px;
  }

  .self-username-form {
    grid-template-columns: minmax(0, 1fr);
  }

  .self-username-form .self-setting-button {
    justify-self: start;
  }

  .self-password-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .self-password-fields {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 7px;
  }

  .self-password-actions {
    justify-items: start;
    margin: 8px 0 0;
    padding: 14px 0 0;
    border-top: 2px solid #cbd9d0;
    border-left: 0;
  }

  .self-password-actions .self-setting-button {
    justify-self: start;
  }

  .self-title {
    margin-bottom: 13px;
    font-size: 19px;
  }

  .self-card {
    margin: 0 -18px;
  }

  .self-card-content {
    padding: 42px 18px 16px;
  }

  .self-cover::after {
    right: 12px;
    top: 10px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .self-identity-card {
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
  }

  .self-avatar {
    width: 78px;
    height: 78px;
    border-radius: 20px;
    font-size: 29px;
  }

  .self-profile {
    gap: 15px;
  }

  .self-name-row {
    gap: 6px;
  }

  .self-username {
    font-size: clamp(18px, 5vw, 23px);
  }

  .self-role {
    min-height: 26px;
    padding: 3px 8px 3px 6px;
    font-size: 11px;
  }

  .self-role svg {
    width: 17px;
    height: 17px;
  }

  .self-progress-row {
    gap: 6px;
  }

  .self-level {
    min-width: 46px;
  }

  .self-level-badge {
    width: 34px;
    height: 34px;
  }

  .self-signature,
  .self-page-status {
    margin-left: 0;
  }

  .self-signature {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .self-calendar-grid.is-month-transitioning {
    animation: none;
  }
}

@media (max-width: 380px) {
  .self-identity-card {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 10px;
  }

  .self-avatar {
    width: 66px;
    height: 66px;
    border-radius: 17px;
    font-size: 25px;
  }
}
