:root {
  --milk: #fff3bf;
  --cream: #fff9df;
  --butter: #ffd95c;
  --rose: #ff7eb6;
  --coral: #ff8a7a;
  --mint: #5ee6b5;
  --sky: #79c7ff;
  --violet: #b8a7ff;
  --ink: #453927;
  --muted: #8a7659;
  --white: #fffef8;
  --line: rgba(120, 86, 30, 0.16);
  --shadow: 0 24px 60px rgba(163, 117, 45, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    "Noto Sans SC",
    system-ui,
    sans-serif;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.52) 0 8rem, transparent 8.5rem),
    radial-gradient(circle at 76% 82%, rgba(255, 255, 255, 0.34) 0 9rem, transparent 9.6rem),
    linear-gradient(135deg, #fff0a8 0%, #fff6ca 48%, #fffbe9 100%);
  overflow-x: hidden;
}

body::before,
body::after {
  position: fixed;
  z-index: -1;
  content: "";
  pointer-events: none;
}

body::before {
  inset: 0;
  opacity: 0.62;
  background:
    radial-gradient(circle, rgba(116, 184, 235, 0.42) 0 3px, transparent 3.8px),
    radial-gradient(circle, rgba(255, 255, 255, 0.28) 0 2px, transparent 2.8px);
  background-position:
    0 0,
    18px 18px;
  background-size:
    36px 36px,
    54px 54px;
}

body::after {
  inset: 0;
  opacity: 0.8;
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 255, 255, 0.38) 0 5.2rem, rgba(255, 255, 255, 0.14) 5.25rem 6.4rem, transparent 6.5rem),
    radial-gradient(circle at 24% 42%, rgba(255, 255, 255, 0.2) 0 2.9rem, rgba(255, 255, 255, 0.08) 2.95rem 3.7rem, transparent 3.8rem),
    radial-gradient(circle at 30% 82%, rgba(255, 255, 255, 0.28) 0 4.2rem, rgba(255, 255, 255, 0.1) 4.25rem 5.1rem, transparent 5.2rem),
    radial-gradient(circle at 52% 10%, rgba(255, 255, 255, 0.22) 0 3.5rem, rgba(255, 255, 255, 0.08) 3.55rem 4.3rem, transparent 4.4rem),
    radial-gradient(circle at 61% 68%, rgba(255, 255, 255, 0.18) 0 2.6rem, rgba(255, 255, 255, 0.07) 2.65rem 3.2rem, transparent 3.3rem),
    radial-gradient(circle at 86% 14%, rgba(255, 255, 255, 0.34) 0 4.8rem, rgba(255, 255, 255, 0.12) 4.85rem 5.8rem, transparent 5.9rem),
    radial-gradient(circle at 88% 58%, rgba(255, 255, 255, 0.18) 0 3rem, rgba(255, 255, 255, 0.07) 3.05rem 3.8rem, transparent 3.9rem),
    radial-gradient(circle at 78% 84%, rgba(255, 255, 255, 0.3) 0 5.8rem, rgba(255, 255, 255, 0.11) 5.85rem 7rem, transparent 7.1rem),
    radial-gradient(circle at 93% 90%, rgba(255, 255, 255, 0.42) 0 4.8rem, rgba(255, 255, 255, 0.16) 4.85rem 5.8rem, transparent 5.9rem),
    radial-gradient(circle at 84% 96%, rgba(255, 255, 255, 0.3) 0 2.9rem, rgba(255, 255, 255, 0.1) 2.95rem 3.6rem, transparent 3.7rem),
    radial-gradient(circle at 98% 72%, rgba(255, 255, 255, 0.24) 0 2.2rem, rgba(255, 255, 255, 0.08) 2.25rem 2.8rem, transparent 2.9rem),
    linear-gradient(115deg, rgba(255, 255, 255, 0.14), transparent 30% 70%, rgba(255, 255, 255, 0.12));
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.login-body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-shell {
  width: min(430px, 100%);
}

.login-card {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  text-align: center;
  background: rgba(255, 254, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-avatar {
  width: 116px;
  aspect-ratio: 1;
  margin: 0 auto 2px;
  overflow: hidden;
  border: 6px solid #fff6cb;
  border-radius: 50%;
  box-shadow:
    0 0 0 7px rgba(255, 126, 182, 0.18),
    0 14px 32px rgba(111, 69, 49, 0.16);
}

.login-avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 52% 34%;
}

.login-card h1 {
  margin: -4px 0 0;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.login-copy,
.login-error {
  margin: 0;
  line-height: 1.7;
}

.login-copy {
  color: var(--muted);
}

.login-error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 126, 182, 0.36);
  border-radius: 8px;
  color: #9b2d48;
  font-weight: 800;
  background: rgba(255, 126, 182, 0.12);
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 2px;
  text-align: left;
}

.login-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid rgba(120, 86, 30, 0.16);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
  outline: none;
}

.login-form input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(255, 126, 182, 0.14);
}

.logout-link {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 10;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 254, 248, 0.86);
  box-shadow: 0 12px 30px rgba(163, 117, 45, 0.14);
}

.app-shell {
  position: relative;
  z-index: 0;
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 48px);
  margin: 24px auto;
  display: grid;
  grid-template-columns: 300px minmax(440px, 1fr) 300px;
  gap: 18px;
  align-items: stretch;
}

.app-shell::before,
.app-shell::after {
  display: none;
}

.app-shell::before {
  top: 5.5rem;
  left: max(1rem, calc((100vw - 1180px) / 2 - 2rem));
  width: 13rem;
  height: 13rem;
  border-radius: 50%;
  opacity: 0.42;
  background:
    radial-gradient(circle at 52% 52%, transparent 0 42%, rgba(255, 255, 255, 0.66) 43% 54%, transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(121, 199, 255, 0.26), rgba(121, 199, 255, 0.04));
}

.app-shell::after {
  top: 2.2rem;
  right: max(1rem, calc((100vw - 1180px) / 2 - 1rem));
  width: 11rem;
  height: 8rem;
  border: 2px dashed rgba(255, 126, 182, 0.22);
  border-radius: 50% 42% 55% 44%;
  opacity: 0.5;
  background:
    radial-gradient(circle at 24% 36%, rgba(121, 199, 255, 0.26) 0 0.46rem, transparent 0.5rem),
    radial-gradient(circle at 52% 58%, rgba(121, 199, 255, 0.18) 0 0.42rem, transparent 0.48rem),
    radial-gradient(circle at 76% 34%, rgba(255, 255, 255, 0.52) 0 0.42rem, transparent 0.48rem),
    rgba(255, 255, 255, 0.16);
}

.hero-panel,
.calendar-panel,
.day-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 254, 248, 0.86), rgba(255, 254, 248, 0.68)),
    rgba(255, 254, 248, 0.76);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-panel::after,
.calendar-panel::before,
.day-panel::before {
  position: absolute;
  z-index: -1;
  content: "";
  pointer-events: none;
}

.hero-panel {
  padding: 22px;
  display: flex;
  min-height: 620px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.hero-panel::before {
  position: absolute;
  inset: 14px;
  z-index: -1;
  border: 2px dashed rgba(255, 126, 182, 0.28);
  border-radius: 8px;
  content: "";
}

.hero-panel::after {
  display: none;
}

.profile-wrap {
  position: relative;
  width: 220px;
  aspect-ratio: 1;
  margin: 8px auto 22px;
  border: 8px solid #fff6cb;
  border-radius: 50%;
  box-shadow:
    0 0 0 8px rgba(255, 126, 182, 0.22),
    0 0 0 16px rgba(94, 230, 181, 0.18),
    0 18px 40px rgba(111, 69, 49, 0.18);
}

.profile-wrap::before,
.profile-wrap::after {
  position: absolute;
  z-index: 2;
  content: "";
  background: var(--rose);
}

.profile-wrap::before {
  width: 52px;
  height: 52px;
  right: -18px;
  top: 22px;
  clip-path: polygon(50% 0, 62% 34%, 98% 36%, 69% 58%, 79% 94%, 50% 72%, 21% 94%, 31% 58%, 2% 36%, 38% 34%);
}

.profile-wrap::after {
  width: 42px;
  height: 34px;
  left: -6px;
  bottom: 24px;
  border-radius: 42px 42px 6px 6px;
  background: var(--mint);
  transform: rotate(-18deg);
}

.profile-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  object-fit: cover;
  object-position: 52% 34%;
}

.sparkle {
  position: absolute;
  z-index: 3;
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--butter);
  box-shadow: 18px 6px 0 var(--sky), -10px 18px 0 var(--violet);
}

.sparkle.one {
  top: 2px;
  left: 20px;
}

.sparkle.two {
  right: 18px;
  bottom: 12px;
  background: var(--coral);
}

.sparkle.three {
  left: 74px;
  bottom: -18px;
  background: var(--mint);
}

.intro h1 {
  margin: 6px 0 10px;
  font-size: clamp(2.35rem, 4vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.summary {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.eyebrow,
.mini-label {
  margin: 0;
  color: #a26c11;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.status-strip {
  display: grid;
  gap: 10px;
  margin-top: 28px;
}

.status-strip span {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.92rem;
}

.dot {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 50%;
  display: inline-block;
}

.dot.free {
  background: var(--mint);
}

.dot.busy {
  background: var(--rose);
}

.dot.soft {
  background: var(--butter);
}

.calendar-panel {
  padding: 22px;
}

.calendar-panel::before {
  display: none;
}

.calendar-top,
.day-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.calendar-top h2,
.day-panel h2,
.booking-dialog h2 {
  margin: 4px 0 0;
  font-size: 1.5rem;
  letter-spacing: 0;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--milk);
  box-shadow: inset 0 -3px 0 rgba(208, 143, 22, 0.16);
  font-size: 2rem;
  line-height: 1;
}

.icon-btn:hover {
  background: #ffe789;
}

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

.week-row {
  margin: 24px 0 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
}

.sync-line {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 126, 182, 0.22);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  font-size: 0.9rem;
  line-height: 1.5;
}

.day-cell {
  position: relative;
  min-height: 86px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  text-align: left;
  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.day-cell:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 126, 182, 0.48);
}

.day-cell.is-outside {
  color: rgba(69, 57, 39, 0.28);
  background: rgba(255, 255, 255, 0.36);
}

.day-cell.is-today {
  border-color: rgba(255, 138, 122, 0.66);
  background: #fff1cf;
}

.day-cell.is-selected {
  border-color: rgba(255, 126, 182, 0.86);
  background: #ffe7f1;
  box-shadow: 0 12px 28px rgba(255, 126, 182, 0.17);
}

.day-number {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 900;
}

.day-cell.is-selected .day-number {
  background: var(--rose);
  color: white;
}

.day-tags {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: flex;
  gap: 5px;
}

.day-tag {
  height: 7px;
  flex: 1;
  border-radius: 99px;
  background: rgba(69, 57, 39, 0.12);
}

.day-tag.free {
  background: var(--mint);
}

.day-tag.booked {
  background: var(--rose);
}

.day-tag.pending {
  background: var(--butter);
}

.day-panel {
  padding: 22px;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.day-panel::before {
  display: none;
}

.slot-list {
  display: grid;
  gap: 12px;
}

.slot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.82);
}

.slot.morning {
  background: linear-gradient(135deg, rgba(255, 217, 92, 0.5), rgba(255, 255, 255, 0.68));
}

.slot.afternoon {
  background: linear-gradient(135deg, rgba(121, 199, 255, 0.34), rgba(255, 231, 241, 0.78));
}

.slot-name {
  margin: 0 0 4px;
  font-weight: 900;
}

.slot-time {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.slot-btn,
.primary-btn,
.ghost-btn {
  min-width: 76px;
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  font-weight: 900;
}

.slot-btn {
  color: white;
  background: var(--rose);
  box-shadow: 0 8px 18px rgba(255, 126, 182, 0.25);
}

.slot-btn[data-booked="true"] {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
  cursor: not-allowed;
}

.slot-btn:disabled,
.primary-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.booking-box {
  flex: 1;
  padding: 18px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--line);
}

.booking-box ul {
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
}

.booking-box li {
  padding: 12px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--muted);
  line-height: 1.55;
}

.booking-box strong {
  display: block;
  color: var(--ink);
}

.booking-dialog {
  width: min(420px, calc(100% - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 30px 90px rgba(58, 38, 12, 0.3);
}

.booking-dialog::backdrop {
  background: rgba(77, 55, 16, 0.34);
  backdrop-filter: blur(5px);
}

.booking-dialog form {
  position: relative;
  padding: 24px;
  display: grid;
  gap: 16px;
  background:
    linear-gradient(135deg, rgba(255, 243, 191, 0.76), rgba(255, 255, 255, 0.82)),
    var(--white);
}

.booking-dialog label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.booking-dialog input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.86);
}

.booking-dialog input:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(255, 126, 182, 0.16);
}

.close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  font-size: 1.4rem;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.ghost-btn {
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
}

.primary-btn {
  color: white;
  background: var(--rose);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .day-panel {
    min-height: auto;
  }

  .hero-panel {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    align-items: center;
  }

  .profile-wrap {
    width: 170px;
    margin: 0;
  }

  .status-strip {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 4px;
  }
}

@media (max-width: 620px) {
  body {
    min-height: 100svh;
    background:
      radial-gradient(circle at 10% 7%, rgba(255, 255, 255, 0.5) 0 4.8rem, transparent 5rem),
      radial-gradient(circle at 84% 92%, rgba(255, 255, 255, 0.3) 0 5.4rem, transparent 5.8rem),
      linear-gradient(180deg, #fff1a8 0%, #fff8d2 58%, #fffbe8 100%);
  }

  body::before {
    opacity: 0.58;
    background:
      radial-gradient(circle, rgba(116, 184, 235, 0.4) 0 2.6px, transparent 3.4px),
      radial-gradient(circle, rgba(255, 255, 255, 0.24) 0 2px, transparent 2.8px);
    background-position:
      0 0,
      15px 15px;
    background-size:
      30px 30px,
      46px 46px;
  }

  body::after {
    inset: 0;
    width: auto;
    height: auto;
    min-width: 0;
    min-height: 0;
    opacity: 0.66;
    background:
      radial-gradient(circle at 8% 12%, rgba(255, 255, 255, 0.36) 0 4.2rem, rgba(255, 255, 255, 0.12) 4.25rem 5rem, transparent 5.1rem),
      radial-gradient(circle at 88% 28%, rgba(255, 255, 255, 0.28) 0 3.5rem, rgba(255, 255, 255, 0.1) 3.55rem 4.2rem, transparent 4.3rem),
      radial-gradient(circle at 22% 48%, rgba(255, 255, 255, 0.18) 0 2.4rem, rgba(255, 255, 255, 0.07) 2.45rem 3rem, transparent 3.1rem),
      radial-gradient(circle at 78% 68%, rgba(255, 255, 255, 0.2) 0 2.8rem, rgba(255, 255, 255, 0.08) 2.85rem 3.5rem, transparent 3.6rem),
      radial-gradient(circle at 18% 90%, rgba(255, 255, 255, 0.24) 0 3.4rem, rgba(255, 255, 255, 0.08) 3.45rem 4.1rem, transparent 4.2rem),
      radial-gradient(circle at 94% 92%, rgba(255, 255, 255, 0.38) 0 3.4rem, rgba(255, 255, 255, 0.13) 3.45rem 4.1rem, transparent 4.2rem),
      radial-gradient(circle at 78% 98%, rgba(255, 255, 255, 0.24) 0 2.1rem, rgba(255, 255, 255, 0.08) 2.15rem 2.7rem, transparent 2.8rem),
      linear-gradient(115deg, rgba(255, 255, 255, 0.12), transparent 30% 70%, rgba(255, 255, 255, 0.1));
  }

  .app-shell::before,
  .app-shell::after {
    display: none;
  }

  .app-shell {
    width: min(100%, 480px);
    min-height: 100svh;
    margin: 0 auto;
    gap: 10px;
    padding: 10px;
  }

  .hero-panel,
  .calendar-panel,
  .day-panel {
    padding: 16px;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 12px;
    text-align: center;
  }

  .profile-wrap {
    width: min(52vw, 178px);
    margin: 4px auto 10px;
  }

  .intro h1 {
    margin-top: 0;
    font-size: 2.1rem;
  }

  .summary {
    font-size: 0.95rem;
    line-height: 1.65;
  }

  .status-strip {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .status-strip span {
    min-height: 34px;
    justify-content: center;
  }

  .calendar-top h2,
  .day-panel h2,
  .booking-dialog h2 {
    font-size: 1.25rem;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .sync-line {
    margin-top: 12px;
    font-size: 0.84rem;
  }

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

  .day-cell {
    min-height: 54px;
    padding: 5px;
  }

  .day-number {
    width: 22px;
    height: 22px;
    font-size: 0.86rem;
  }

  .day-tags {
    right: 5px;
    bottom: 6px;
    left: 5px;
    gap: 3px;
  }

  .slot {
    align-items: flex-start;
    flex-direction: column;
  }

  .slot-btn {
    width: 100%;
    min-height: 46px;
  }

  .booking-dialog {
    width: min(100% - 20px, 430px);
  }

  .booking-dialog form {
    padding: 22px 16px 16px;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}
