:root {
  font-family: "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #23332f;
  background: #f8f7f2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-optical-sizing: auto;
  font-weight: 400;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  overflow: hidden;
}

body {
  min-width: 320px;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow: hidden;
  transition: background 520ms ease;
  background:
    radial-gradient(ellipse at 50% 0%, rgb(229 237 222 / 62%), transparent 48%),
    #f8f7f2;
}

body.auth-open {
  overflow: hidden;
}

.home {
  width: min(100% - 40px, 1120px);
  display: flex;
  height: calc(100vh - 59px);
  height: calc(100dvh - 59px);
  flex-direction: column;
  justify-content: center;
  margin: -16px auto 0;
  padding: 16px 0;
  transform: translateY(-12px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  width: 100%;
  height: 60px;
  border-bottom: 1px solid rgb(225 233 228 / 85%);
  background: rgb(255 255 255 / 92%);
  box-shadow: 0 4px 18px rgb(34 63 50 / 5%);
  backdrop-filter: blur(14px);
}

.topbar-inner {
  display: flex;
  width: 100%;
  height: 59px;
  min-height: 59px;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.account-button {
  min-width: 58px;
  padding: 6px 12px;
  border: 1px solid #dbe8e0;
  border-radius: 8px;
  background: linear-gradient(180deg, #fff 0%, #f8fbf9 100%);
  color: #315e50;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  box-shadow:
    0 2px 4px rgb(35 73 58 / 5%),
    inset 0 1px 0 rgb(255 255 255 / 95%);
}

.account-button:hover {
  transform: translateY(-2px);
  border-color: #b7d2c3;
  background: linear-gradient(180deg, #fff 0%, #f2f8f4 100%);
  box-shadow:
    0 5px 10px rgb(35 73 58 / 10%),
    inset 0 1px 0 rgb(255 255 255 / 95%);
}

.account-button:active {
  transform: translateY(0);
  box-shadow:
    0 1px 2px rgb(35 73 58 / 8%),
    inset 0 1px 2px rgb(35 73 58 / 8%);
}

.account-button--primary {
  border-color: #236d5c;
  background: linear-gradient(180deg, #31846d 0%, #236d5c 100%);
  color: #fff;
  box-shadow:
    0 3px 7px rgb(35 109 92 / 22%),
    inset 0 1px 0 rgb(255 255 255 / 22%);
}

.account-button--primary:hover {
  border-color: #1d5e50;
  background: linear-gradient(180deg, #287862 0%, #1d5e50 100%);
  box-shadow:
    0 6px 12px rgb(35 109 92 / 28%),
    inset 0 1px 0 rgb(255 255 255 / 22%);
}

.auth-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: min(32vw, 220px);
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  overflow: hidden;
  color: #53675e;
  font: inherit;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.auth-user-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d5e7dc;
  border-radius: 50%;
  background: linear-gradient(145deg, #e8f3ed, #cfe5d8);
  color: #26745f;
  font-size: 0.9rem;
  font-weight: 700;
}

.auth-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-user-avatar img[hidden],
.auth-user-avatar-fallback[hidden] {
  display: none;
}

.auth-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-user:hover,
.account-menu-wrap.is-open .auth-user {
  border-color: #e2ebe5;
  background: #f7faf8;
}

.account-menu-wrap {
  position: relative;
}

.account-menu-chevron {
  color: #84958b;
  font-size: 0.7rem;
  transition: transform 150ms ease;
}

.account-menu-wrap.is-open .account-menu-chevron {
  transform: rotate(180deg);
}

.account-menu {
  position: absolute;
  top: 100%;
  right: 0;
  display: none;
  width: 176px;
  padding-top: 8px;
}

.account-menu-wrap:hover .account-menu,
.account-menu-wrap:focus-within .account-menu,
.account-menu-wrap.is-open .account-menu {
  display: block;
}

.account-menu-items {
  padding: 6px;
  border: 1px solid #e3ebe6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 30px rgb(34 63 50 / 14%);
}

.account-menu-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #43584e;
  font: inherit;
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: #f0f6f2;
  color: #285d50;
  outline: none;
}

.account-menu-item--logout {
  color: #a64c46;
}

.account-menu-item--logout:hover,
.account-menu-item--logout:focus-visible {
  background: #fcf2f0;
  color: #913b36;
}

.profile-label {
  margin: 0 0 8px;
  color: #718079;
  font-size: 0.88rem;
}

.profile-username {
  margin: 0;
  color: #263a33;
  font-size: 1.05rem;
  font-weight: 600;
}

.account-button:focus-visible,
.auth-close:focus-visible,
.auth-switch button:focus-visible,
.auth-submit:focus-visible {
  outline: 3px solid #91b6a4;
  outline-offset: 3px;
}

.auth-overlay[hidden],
.auth-form[hidden] {
  display: none;
}

.auth-overlay {
  position: fixed;
  z-index: 10;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(37 57 50 / 58%);
}

.auth-dialog {
  width: min(100%, 520px);
  overflow: hidden;
  filter: none;
  opacity: 1;
  border: 1px solid rgb(221 232 225 / 90%);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 28px 80px rgb(22 46 38 / 24%);
  animation: auth-dialog-enter 180ms ease-out;
}

.profile-confirm-overlay {
  z-index: 13;
}

.logout-confirm-overlay {
  z-index: 14;
}

.lee-warning-overlay {
  z-index: 15;
  background:
    radial-gradient(circle at center, rgb(255 156 156 / 16%), transparent 58%),
    rgb(122 32 32 / 46%);
  animation: lee-warning-backdrop-transition 420ms ease-out both;
}

.lee-warning-overlay .profile-confirm-dialog {
  border: 2px solid #c95656;
  box-shadow:
    0 0 0 4px rgb(255 226 226 / 72%),
    0 24px 70px rgb(94 8 8 / 28%);
  animation: lee-warning-dialog-enter 220ms ease-out;
}

.lee-warning-header {
  background: linear-gradient(135deg, #fff4f4, #ffe2e2);
}

.lee-warning-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #a71919;
}

.lee-warning-icon {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: #c95656;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 10px rgb(170 25 25 / 20%);
}

.lee-warning-overlay .profile-confirm-message {
  color: #762727;
  font-size: 1.02rem;
  font-weight: 600;
}

.lee-warning-overlay .profile-confirm-actions .auth-submit {
  border-color: #b85a5a;
  background: linear-gradient(135deg, #c96a6a, #a94b4b);
  box-shadow: 0 6px 14px rgb(167 25 25 / 16%);
}

.lee-warning-overlay .profile-confirm-actions .auth-submit:hover {
  background: linear-gradient(135deg, #d47777, #b75a5a);
}

body.lee-warning-open {
  background:
    radial-gradient(circle at 50% 0, rgb(255 215 215 / 48%), transparent 42rem),
    linear-gradient(145deg, #fff8f8 0%, #ffeded 60%, #fffafa 100%);
}

@keyframes lee-warning-backdrop-transition {
  from {
    opacity: 0;
    background:
      radial-gradient(circle at center, rgb(255 156 156 / 0%), transparent 58%),
      rgb(122 32 32 / 16%);
  }
  to {
    opacity: 1;
    background:
      radial-gradient(circle at center, rgb(255 156 156 / 16%), transparent 58%),
      rgb(122 32 32 / 46%);
  }
}

@keyframes lee-warning-dialog-enter {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.schedule-overlay {
  z-index: 12;
}

.schedule-dialog {
  width: min(100%, 560px);
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
}

.schedule-dialog-body {
  overflow-y: auto;
}

.schedule-dialog-tabs {
  display: flex;
  align-self: stretch;
  align-items: stretch;
  gap: 8px;
}

.schedule-dialog-tab {
  position: relative;
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #718079;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 650;
  cursor: pointer;
  transition: color 150ms ease;
}

.schedule-dialog-tab::after {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: transparent;
  content: "";
  transition: background-color 150ms ease;
}

.schedule-dialog-tab:hover,
.schedule-dialog-tab.is-active {
  color: #28745c;
}

.schedule-dialog-tab.is-active::after {
  background: #32886f;
}

.schedule-dialog-tab:focus-visible {
  outline: 3px solid #91b6a4;
  outline-offset: -3px;
}

.schedule-dialog-date {
  margin: 0 0 18px;
  color: #718079;
  font-size: 0.9rem;
}

.schedule-list-status {
  margin: 0;
  color: #718079;
  font-size: 0.9rem;
}

.schedule-list-status:empty {
  display: none;
}

.schedule-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedule-list-item {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  border: 1px solid #f0dfbd;
  border-left: 4px solid #d88a25;
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8e9, #fff0cf);
}

.schedule-list-item-clickable {
  cursor: pointer;
}

.schedule-list-item-clickable:hover,
.schedule-list-item-clickable:focus-visible {
  border-color: #d3b77f;
  box-shadow: 0 5px 14px rgb(124 91 35 / 12%);
}

.schedule-list-item-clickable:focus-visible {
  outline: 3px solid #91b6a4;
  outline-offset: 2px;
}

.schedule-details-overlay {
  z-index: 20;
}

.schedule-details-dialog {
  width: min(100%, 480px);
}

.schedule-details-dialog h2 {
  margin: 0;
  color: #28745c;
  font-size: 1.15rem;
}

.schedule-detail-row {
  margin: 0;
  padding: 10px 0;
  border-bottom: 1px solid #e6eee9;
  color: #53665c;
}

.schedule-detail-row strong {
  color: #28745c;
}

.schedule-detail-platform {
  display: flex;
  align-items: center;
}

.schedule-platform-link {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin-left: auto;
  padding: 5px 10px;
  border: 1px solid #9ac7b4;
  border-radius: 8px;
  background: #eef8f3;
  color: #28745c;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.schedule-platform-link:hover {
  border-color: #5da689;
  background: #dff2e8;
}

.schedule-platform-link:focus-visible {
  outline: 3px solid #91b6a4;
  outline-offset: 2px;
}

.schedule-detail-overdue {
  margin: 16px 0 0;
  color: #b52f35;
  font-weight: 700;
}

.schedule-detail-overdue.is-completed {
  color: #68717a;
}

.schedule-list-info {
  min-width: 0;
}

.schedule-list-item h3 {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: #5f461e;
  font-size: 1rem;
}

.schedule-title-text {
  overflow: hidden;
  min-width: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-list-item.is-overdue {
  border-color: #efb4b0;
  border-left-color: #d64545;
  background: linear-gradient(135deg, #fff1f0, #ffe2e0);
}

.schedule-list-item.is-overdue h3 {
  color: #b52f35;
}

.schedule-overdue-label {
  flex: 0 0 auto;
  display: inline-block;
  margin-left: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #d64545;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.3;
  vertical-align: 2px;
}

.schedule-list-item.is-overdue .schedule-list-time {
  color: #b52f35;
}

.schedule-list-item.is-overdue .schedule-list-time-divider {
  background-color: #b52f35;
}

.schedule-list-item.is-completed {
  border-color: #a9d8bd;
  border-left-color: #3b9a68;
  background: linear-gradient(135deg, #effaf2, #dff3e6);
}

.schedule-list-item.is-completed h3,
.schedule-list-item.is-completed .schedule-list-time {
  color: #2f8055;
}

.schedule-list-item.is-completed .schedule-list-time-divider {
  background-color: #2f8055;
}

.schedule-completion-button {
  min-width: 64px;
  padding: 5px 8px;
  border: 1px solid #9ac7b4;
  border-radius: 8px;
  background: #f0faf4;
  color: #28745c;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.schedule-completion-button:hover:not(:disabled) {
  border-color: #5da689;
  background: #dff2e8;
}

.schedule-completion-button:focus-visible {
  outline: 3px solid #91b6a4;
  outline-offset: 2px;
}

.schedule-completion-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.schedule-list-item.is-completed .schedule-completion-button {
  border-color: #72b38d;
  background: #d4efdd;
  color: #26734a;
}

.schedule-list-item.is-overdue.is-completed {
  border-color: #c7cbd0;
  border-left-color: #7d858d;
  background: linear-gradient(135deg, #f0f1f2, #dfe2e5);
}

.schedule-list-item.is-overdue.is-completed h3,
.schedule-list-item.is-overdue.is-completed .schedule-list-time {
  color: #68717a;
}

.schedule-list-item.is-overdue.is-completed .schedule-list-time-divider {
  background-color: #68717a;
}

.schedule-list-item.is-overdue.is-completed .schedule-completion-button {
  border-color: #aeb5bb;
  background: #e2e5e7;
  color: #626b73;
}

.schedule-list-time {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  color: #805415;
  font-size: 0.82rem;
  font-weight: 650;
}

.schedule-list-time-values {
  display: grid;
  justify-items: center;
  gap: 2px;
}

.schedule-list-time-start,
.schedule-list-time-end {
  line-height: 1.35;
}

.schedule-list-time-divider {
  width: 1px;
  height: 12px;
  background-color: #805415;
}

.schedule-list-delete {
  min-width: 48px;
  padding: 4px 8px;
  border: 1px solid #e4c7a2;
  border-radius: 8px;
  background: rgb(255 255 255 / 70%);
  color: #9a5142;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.schedule-list-delete:hover:not(:disabled) {
  border-color: #d7a080;
  background: #fff4ed;
}

.schedule-list-delete:focus-visible {
  outline: 3px solid #c99476;
  outline-offset: 2px;
}

.schedule-list-delete:disabled {
  cursor: wait;
  opacity: 0.6;
}

.schedule-list-details {
  overflow: hidden;
  margin: 7px 0 0;
  color: #718079;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-list-empty {
  padding: 28px 16px;
  border: 1px dashed #d6e3db;
  border-radius: 12px;
  color: #718079;
  text-align: center;
}

.schedule-add-panel[hidden] {
  display: none;
}

.schedule-form {
  display: grid;
  gap: 10px;
}

.schedule-form > label,
.schedule-time-control label {
  color: #53675e;
  font-size: 0.9rem;
  font-weight: 600;
}

.schedule-form input:not([type="hidden"]) {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #d6e3db;
  border-radius: 10px;
  background: #fff;
  color: #263a33;
  font: inherit;
}

.schedule-select {
  position: relative;
}

.schedule-select-trigger {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px 0 12px;
  border: 1px solid #d6e3db;
  border-radius: 10px;
  background-color: #fff;
  color: #263a33;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
}

.schedule-select-trigger::after {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  margin: -4px 2px 0 12px;
  border-right: 2px solid #39755f;
  border-bottom: 2px solid #39755f;
  content: "";
  transform: rotate(45deg);
  transition: transform 150ms ease, margin 150ms ease;
}

.schedule-select-trigger[aria-expanded="true"]::after {
  margin-top: 4px;
  transform: rotate(225deg);
}

.schedule-select-trigger:hover {
  border-color: #b7d2c3;
  background-color: #f5faf7;
}

.schedule-select-trigger:focus-visible,
.schedule-form input:focus,
.schedule-select-trigger[aria-expanded="true"] {
  border-color: #438c73;
  outline: none;
  box-shadow: 0 0 0 3px rgb(67 140 115 / 15%);
}

.schedule-select-options[hidden] {
  display: none;
}

.schedule-select-options {
  position: absolute;
  z-index: 3;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  display: grid;
  max-height: 210px;
  overflow-y: auto;
  padding: 5px;
  border: 1px solid #d6e3db;
  border-radius: 12px;
  background-color: #fff;
  box-shadow: 0 12px 28px rgb(22 46 38 / 16%);
  animation: schedule-options-enter 150ms ease-out both;
}

@keyframes schedule-options-enter {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.schedule-select-option {
  min-height: 38px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background-color: #fff;
  color: #405c50;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}

.schedule-select-option:hover,
.schedule-select-option:focus-visible {
  outline: none;
  background-color: #f0f7f2;
  color: #28745c;
}

.schedule-select-option[aria-selected="true"] {
  background-color: #e4f1e9;
  color: #28745c;
}

.schedule-select-option[aria-selected="true"]:hover,
.schedule-select-option[aria-selected="true"]:focus-visible {
  background-color: #d7ebdf;
}

@media (prefers-reduced-motion: reduce) {
  .schedule-select-options {
    animation: none;
  }
}

.schedule-time-field,
.schedule-visibility-field {
  min-width: 0;
  margin: 6px 0 0;
  padding: 0;
  border: 0;
}

.schedule-visibility-field legend {
  margin-bottom: 10px;
  color: #53675e;
  font-size: 0.9rem;
  font-weight: 600;
}

.schedule-time-inputs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 12px;
}

.schedule-time-control {
  display: grid;
  gap: 7px;
}

.schedule-time-inputs > span {
  padding-bottom: 12px;
  color: #718079;
}

.schedule-visibility-options,
.schedule-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.schedule-visibility-options {
  width: fit-content;
  justify-content: flex-start;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d6e3db;
  border-radius: 12px;
  background-color: #f2f7f4;
  box-shadow: inset 0 1px 2px rgb(35 73 58 / 5%);
}

.schedule-visibility-option {
  min-width: 92px;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 9px;
  background-color: #edf4ef;
  color: #718079;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, color 150ms ease;
}

.schedule-visibility-option:hover:not([aria-pressed="true"]) {
  background-color: #e4eee7;
  color: #53675e;
}

.schedule-visibility-option[aria-pressed="true"] {
  border-color: #28745c;
  background-color: #32886f;
  box-shadow: 0 3px 8px rgb(35 105 81 / 20%);
  color: #fff;
}

.schedule-visibility-option:focus-visible,
.schedule-form-actions button:focus-visible {
  outline: 3px solid #91b6a4;
  outline-offset: 3px;
}

.schedule-form-status {
  min-height: 18px;
  margin: 0;
  color: #b43e3e;
  font-size: 0.85rem;
}

.schedule-form-status:empty {
  min-height: 0;
}

.schedule-form-actions {
  margin-top: 6px;
}

.schedule-form-actions button {
  min-width: 88px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.schedule-form-actions .auth-submit {
  min-height: 44px;
}

.schedule-form-actions .auth-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.profile-confirm-dialog {
  width: min(100%, 440px);
}

.profile-confirm-message {
  margin: 0 0 24px;
  color: #53675e;
  line-height: 1.7;
}

.profile-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.profile-confirm-actions button {
  min-width: 88px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.profile-confirm-cancel {
  border: 1px solid #d6e3db;
  background: #fff;
  color: #53675e;
}

.profile-confirm-cancel:hover {
  border-color: #b7c9be;
  background: #f5f8f6;
}

.profile-confirm-cancel:focus-visible {
  outline: 3px solid #91b6a4;
  outline-offset: 3px;
}

.profile-confirm-actions .auth-submit {
  min-height: 44px;
  padding: 0 18px;
}

.auth-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 30px;
  border-bottom: 1px solid #e6ece8;
}

.auth-dialog-header h2 {
  margin: 0;
  color: #263a33;
  font-size: 1.35rem;
  font-weight: 700;
}

.auth-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #87958f;
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.auth-close:hover {
  background: #f1f5f2;
  color: #405c50;
}

.auth-dialog-body {
  padding: 26px 30px 28px;
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-form label {
  margin: 0 0 8px;
  color: #53675e;
  font-size: 0.92rem;
  font-weight: 600;
}

.auth-form input {
  width: 100%;
  min-height: 50px;
  margin: 0 0 18px;
  padding: 0 13px;
  border: 1px solid #d6e3db;
  border-radius: 10px;
  background: #fff;
  color: #263a33;
  font: inherit;
  outline: none;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease;
}

.auth-form input:focus {
  border-color: #438c73;
  box-shadow: 0 0 0 3px rgb(67 140 115 / 15%);
}

.password-hint {
  margin: -11px 0 18px;
  color: #7d8b84;
  font-size: 0.8rem;
}

.auth-submit {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: #347565;
  color: #fff;
  filter: none;
  opacity: 1;
  text-shadow: none;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: none;
  transition:
    background-color 150ms ease,
    transform 150ms ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  background: #2d6859;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 1;
}

.auth-switch {
  margin: 19px 0 0;
  color: #75847d;
  text-align: center;
  font-size: 0.9rem;
}

.auth-switch button {
  padding: 2px;
  border: 0;
  background: transparent;
  color: #347565;
  filter: none;
  opacity: 1;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.auth-switch button:hover {
  color: #245c4e;
  text-decoration: underline;
}

.auth-message {
  min-height: 0;
  margin: 0;
  color: #b43e3e;
  font-size: 0.88rem;
  text-align: center;
}

.auth-message:not(:empty) {
  margin-top: 14px;
}

@keyframes auth-dialog-enter {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: clamp(52px, 6.5vw, 64px);
  height: clamp(52px, 6.5vw, 64px);
  color: #347565;
  filter: drop-shadow(0 7px 10px rgb(39 86 73 / 16%));
}

.brand-name {
  display: inline-block;
  transform: translateY(-3px);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: clamp(34px, 5.2vw, 46px);
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1;
}

.topbar .brand {
  gap: 10px;
}

.topbar .brand-mark {
  width: 48px;
  height: 48px;
}

.topbar .brand-name {
  transform: none;
  color: #263b35;
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.search-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  width: fit-content;
  max-width: 100%;
  margin: 12px auto 0;
  padding: 8px;
  border: 1px solid #e8e8df;
  border-radius: 18px;
  background: rgb(255 255 255 / 78%);
  box-shadow: 0 16px 40px rgb(45 62 54 / 7%);
}

.nav-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 25px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #65716b;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition:
    color 160ms ease,
    background-color 160ms ease,
    transform 160ms ease;
}

.nav-item:hover {
  color: #285d50;
  background: #f0f5ef;
}

.nav-item:focus-visible {
  outline: 3px solid #91b6a4;
  outline-offset: 3px;
}

.nav-item.is-active {
  background: #347565;
  color: #fff;
  box-shadow: 0 5px 12px rgb(52 117 101 / 18%);
}

.nav-item.is-active:hover {
  background: #2d6859;
}

.nav-icon {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  flex: 0 0 22px;
}

.nav-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
  transition: transform 180ms ease, stroke-width 180ms ease;
}

.nav-item:hover .nav-icon svg {
  transform: translateY(-1px) scale(1.05);
}

.nav-item.is-active .nav-icon svg {
  stroke-width: 1.9;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 2.5vh, 18px);
  width: min(742px, calc(66.6667% - 5px));
  margin-top: 24px;
  margin-right: auto;
  margin-left: auto;
}

.platform-grid[hidden] {
  display: none;
}

.course-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 1120px);
}

.time-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(742px, calc(66.6667% - 5px));
}

.platform-card {
  position: relative;
  display: flex;
  min-height: 148px;
  flex-direction: column;
  align-items: flex-start;
  padding: 20px;
  overflow: hidden;
  border: 1px solid #dde8e1;
  border-radius: 18px;
  background: rgb(255 255 255 / 90%);
  box-shadow: 0 12px 28px rgb(28 66 52 / 7%);
  color: inherit;
  text-decoration: none;
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease;
}

.platform-card::after {
  position: absolute;
  right: -38px;
  bottom: -58px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgb(203 231 215 / 42%), transparent 70%);
  content: "";
  pointer-events: none;
  transition: transform 250ms ease;
}

.platform-card:hover {
  transform: translateY(-5px);
  border-color: #b9d6c6;
  box-shadow: 0 18px 36px rgb(28 66 52 / 11%);
}

.platform-card:focus-visible {
  outline: 3px solid rgb(52 134 108 / 35%);
  outline-offset: 3px;
}

.platform-card:hover::after {
  transform: scale(1.25);
}

.platform-card h2 {
  position: relative;
  z-index: 1;
  margin: 15px 0 0;
  color: #2d493e;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.today-exclusive-badge {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 50%;
  display: inline-flex;
  max-width: calc(100% - 135px);
  align-items: center;
  gap: 7px;
  padding: 10px 14px 10px 11px;
  border: 1px solid #ead8a6;
  border-radius: 999px;
  background: linear-gradient(135deg, #fffdf2, #fff5d8);
  box-shadow: 0 5px 14px rgb(172 132 45 / 12%);
  color: #80621f;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.25;
  transform: translate(50%, -50%);
}

.today-exclusive-badge::before {
  position: absolute;
  inset: -4px;
  border: 1px solid rgb(228 194 108 / 35%);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.today-exclusive-badge svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: #f0c85e;
  stroke: #b98522;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.2;
}

.platform-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid #d7e9de;
  border-radius: 15px;
  background: linear-gradient(145deg, #f5fbf7, #eaf5ee);
  color: #318168;
}

.platform-icon svg {
  width: 55%;
  height: 55%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.platform-arrow {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 17px;
  color: #6f9e89;
  font-size: 1.6rem;
  line-height: 1;
  transition: transform 200ms ease;
}

.platform-card:hover .platform-arrow {
  transform: translateX(3px);
}

@media (max-width: 560px) {
  .topbar {
    height: 54px;
  }

  .home {
    width: min(100% - 28px, 420px);
    height: calc(100vh - 53px);
    height: calc(100dvh - 53px);
    margin-top: -12px;
    padding: 10px 0;
    transform: translateY(-12px);
  }

  .topbar-inner {
    height: 53px;
    min-height: 53px;
    padding: 0 14px;
  }

  .account-actions {
    gap: 9px;
  }

  .account-button {
    min-width: 58px;
    padding: 6px 11px;
    font-size: 0.82rem;
  }

  .auth-user {
    max-width: 48vw;
    padding: 6px 9px;
  }

  .brand {
    gap: 10px;
  }

  .topbar .brand {
    gap: 7px;
  }

  .topbar .brand-mark {
    width: 40px;
    height: 40px;
  }

  .topbar .brand-name {
    font-size: 18px;
  }

  .search-nav {
    width: 100%;
    gap: 2px;
    margin-top: 12px;
    padding: 6px;
  }

  .nav-item {
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    min-height: 62px;
    padding: 7px 4px;
    font-size: 0.82rem;
  }

  .platform-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin-top: 12px;
  }

  .course-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-card {
    min-height: 112px;
    padding: 15px;
  }

  .platform-card h2 {
    margin-top: 10px;
    font-size: 1rem;
  }

  .today-exclusive-badge {
    max-width: calc(100% - 32px);
    gap: 5px;
    padding: 8px 11px 8px 9px;
    font-size: 0.68rem;
  }

  .today-exclusive-badge svg {
    width: 15px;
    height: 15px;
  }

  .auth-overlay {
    padding: 14px;
  }

  .auth-dialog {
    border-radius: 19px;
  }

  .auth-dialog-header {
    min-height: 66px;
    padding: 0 20px;
  }

  .auth-dialog-body {
    padding: 22px 20px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
