:root {
  --ink: #18332d;
  --green: #174c3e;
  --green-deep: #103b31;
  --mint: #dff36b;
  --paper: #f4f5f0;
  --white: #ffffff;
  --line: #dfe4dc;
  --muted: #6c7873;
  --soft: #edf0e9;
  --occupied: #f0f1ee;
  --shadow: 0 18px 55px rgba(24, 51, 45, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, select, input { font: inherit; }
button, select { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }

.topbar {
  height: 78px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px 10px 10px 3px;
  background: var(--green);
  color: var(--mint);
  font-family: Georgia, serif;
  font-size: 23px;
  font-style: italic;
  font-weight: 700;
}

.brand-name { font-size: 17px; font-weight: 750; letter-spacing: -0.4px; }
.brand-name span { color: #78827e; font-weight: 500; }

.open-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid #dce2d8;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.55);
  color: #54645e;
  font-size: 12px;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4c9c63;
  box-shadow: 0 0 0 4px rgba(76, 156, 99, 0.12);
}

.page-shell { max-width: 1184px; margin: 0 auto; padding: 10px 28px 50px; }

.hero {
  position: relative;
  min-height: 320px;
  padding: 49px 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  overflow: hidden;
  border-radius: 26px;
  background: var(--green-deep);
  color: var(--white);
}

.hero-copy, .progress-card { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 17px; color: #b8cbc3; font-size: 12px; font-weight: 650; letter-spacing: 3px; }
.eyebrow span { margin: 0 8px; color: var(--mint); }

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 4.2vw, 53px);
  line-height: 1.17;
  letter-spacing: -2px;
  font-weight: 750;
}

.hero h1 em { color: var(--mint); font-family: Georgia, "Songti SC", serif; font-weight: 500; }
.hero-description { margin: 20px 0 22px; color: #c6d4cf; font-size: 14px; line-height: 1.85; }
.date-chip { display: inline-flex; padding: 7px 12px; border: 1px solid rgba(223, 243, 107, 0.28); border-radius: 7px; color: var(--mint); font-size: 12px; letter-spacing: 0.5px; }

.progress-card {
  flex: 0 0 278px;
  padding: 26px 27px 23px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.075);
  backdrop-filter: blur(8px);
}

.progress-heading { display: flex; align-items: center; justify-content: space-between; color: #e5ede9; font-size: 13px; }
.progress-label { color: #a8bdb5; font-size: 10px; }
.progress-number { margin-top: 13px; line-height: 1; color: #a9bdb5; }
.progress-number strong { color: var(--mint); font-size: 48px; font-weight: 650; letter-spacing: -2px; }
.progress-number span { font-size: 20px; }
.progress-card > p { margin: 8px 0 20px; color: #b7c8c1; font-size: 12px; }
.progress-track { height: 6px; overflow: hidden; border-radius: 5px; background: rgba(255, 255, 255, 0.14); }
.progress-fill { width: 0; height: 100%; border-radius: inherit; background: var(--mint); transition: width 500ms ease; }
.progress-foot { display: flex; justify-content: space-between; margin-top: 10px; color: #b7c8c1; font-size: 10px; }

.hero-orbit { position: absolute; border: 1px solid rgba(223, 243, 107, 0.09); border-radius: 50%; pointer-events: none; }
.orbit-one { width: 390px; height: 390px; right: -120px; top: -190px; }
.orbit-two { width: 280px; height: 280px; left: 43%; bottom: -225px; }

.notice {
  margin: 20px 0;
  padding: 18px 26px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.6);
}

.notice-icon { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 8px; background: #e8eddf; color: var(--green); font-family: Georgia, serif; font-size: 14px; }
.notice > div:not(.notice-icon):not(.notice-divider) { display: flex; flex-direction: column; gap: 3px; }
.notice strong { font-size: 13px; font-weight: 650; }
.notice span { color: var(--muted); font-size: 11px; }
.notice-divider { width: 1px; height: 30px; margin: 0 18px; background: var(--line); }

.booking-panel {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid #e0e4dc;
  border-radius: 20px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.teacher-sidebar { padding: 30px 25px; border-right: 1px solid var(--line); background: #fbfcf9; }
.step-heading { display: flex; align-items: center; gap: 10px; }
.step-heading > span { color: #8d9993; font-family: Georgia, serif; font-size: 12px; font-style: italic; }
.step-heading h2 { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.field-label { display: block; margin: 27px 0 9px; color: #67756f; font-size: 11px; font-weight: 600; }
.select-wrap { position: relative; }
.select-wrap select {
  width: 100%;
  height: 45px;
  padding: 0 38px 0 13px;
  appearance: none;
  border: 1px solid #d8ded5;
  border-radius: 9px;
  outline: none;
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  transition: border-color 160ms, box-shadow 160ms;
}
.select-wrap select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 76, 62, 0.1); }
.select-wrap select:disabled { color: #9ba49f; background: #f5f6f3; }
.select-arrow { position: absolute; top: 17px; right: 15px; width: 7px; height: 7px; border-right: 1.5px solid #738079; border-bottom: 1.5px solid #738079; transform: rotate(45deg); pointer-events: none; }
.field-hint { margin: 9px 1px 0; color: #87928d; font-size: 10px; line-height: 1.65; }

.selection-summary { min-height: 153px; margin: 24px 0 16px; }
.summary-empty { min-height: 153px; display: flex; flex-direction: column; justify-content: center; align-items: center; border: 1px dashed #dce1d8; border-radius: 11px; color: #97a09b; text-align: center; }
.summary-empty p { margin: 10px 0 0; font-size: 11px; line-height: 1.8; }
.summary-line { width: 26px; height: 2px; background: #d9dfd3; }
.summary-filled { padding: 16px; border: 1px solid #dfe5d6; border-radius: 11px; background: #f3f6eb; }
.summary-kicker { color: #72806f; font-size: 10px; }
.summary-teacher { margin: 5px 0 14px; font-size: 16px; font-weight: 700; }
.summary-course { padding-top: 12px; border-top: 1px solid #dfe5d6; }
.summary-course strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.summary-course span { display: block; margin-top: 5px; color: #6e7a73; font-size: 11px; line-height: 1.6; }
.summary-existing { display: inline-block; margin-top: 11px; padding: 3px 7px; border-radius: 4px; background: #e2e9d4; color: #526443; font-size: 9px; }

.primary-button {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 9px;
  background: var(--green);
  color: var(--white);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.5px;
  transition: background 160ms, transform 160ms;
}
.primary-button:not(:disabled):hover { background: #0e3e32; transform: translateY(-1px); }
.primary-button:not(:disabled):active { transform: translateY(0); }
.primary-button:disabled { background: #e2e6df; color: #a0aaa4; }
.submit-hint { margin: 9px 0 0; color: #939c97; font-size: 9px; text-align: center; }

.schedule-area { min-width: 0; padding: 30px 32px 22px; }
.schedule-heading { display: flex; justify-content: space-between; align-items: center; }
.schedule-caption { color: #8b9690; font-size: 10px; }
.day-tabs { display: flex; gap: 7px; margin: 25px 0 20px; overflow-x: auto; padding-bottom: 2px; }
.day-tab {
  min-width: 105px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--white);
  color: #67736d;
  text-align: left;
  transition: border-color 160ms, background 160ms;
}
.day-tab span { display: block; font-size: 12px; font-weight: 600; }
.day-tab small { display: block; margin-top: 3px; color: #98a19c; font-size: 9px; }
.day-tab.active { border-color: var(--green); background: var(--green); color: var(--white); }
.day-tab.active small { color: #b9cec5; }
.day-tab:focus-visible { outline: 3px solid rgba(23, 76, 62, 0.2); outline-offset: 2px; }

.schedule-list { min-height: 247px; display: flex; flex-direction: column; gap: 10px; }
.loading-state, .empty-state { min-height: 240px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #8a958f; text-align: center; }
.loading-state p, .empty-state p { margin: 12px 0 0; font-size: 12px; line-height: 1.8; }
.empty-state strong { color: #5f6e67; font-size: 14px; }
.empty-icon { width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid #dfe4db; border-radius: 13px; color: #87928b; font-family: Georgia, serif; font-size: 20px; }
.spinner { width: 25px; height: 25px; border: 2px solid #e0e5dc; border-top-color: var(--green); border-radius: 50%; animation: spin 800ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.lesson-card {
  position: relative;
  display: grid;
  grid-template-columns: 22px 102px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-height: 80px;
  padding: 14px 16px;
  border: 1px solid #e0e5dd;
  border-radius: 11px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 160ms, background 160ms, transform 160ms;
}
.lesson-card:hover:not(.occupied) { border-color: #94aa9d; transform: translateY(-1px); }
.lesson-card.selected { border-color: var(--green); background: #f3f7ec; box-shadow: inset 3px 0 0 var(--green); }
.lesson-card.occupied { border-color: #e6e8e4; background: var(--occupied); color: #929a96; cursor: not-allowed; }
.lesson-radio { width: 16px; height: 16px; margin: 0; accent-color: var(--green); }
.lesson-time strong { display: block; font-size: 13px; font-weight: 700; }
.lesson-time span { display: block; margin-top: 5px; color: #85918b; font-size: 10px; white-space: nowrap; }
.lesson-info { min-width: 0; }
.lesson-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 650; }
.lesson-meta { display: flex; flex-wrap: wrap; gap: 5px 12px; margin-top: 6px; color: #7c8882; font-size: 10px; }
.lesson-meta span { display: inline-flex; align-items: center; gap: 4px; }
.lesson-meta span + span::before { content: ""; width: 2px; height: 2px; margin-right: 5px; border-radius: 50%; background: #a5ada8; }
.lesson-badge { padding: 5px 8px; border-radius: 5px; background: #edf2e6; color: #557047; font-size: 9px; white-space: nowrap; }
.lesson-card.selected .lesson-badge { background: var(--green); color: var(--white); }
.lesson-card.occupied .lesson-badge { background: #e3e5e1; color: #8a918d; }
.lesson-card.occupied .lesson-time span, .lesson-card.occupied .lesson-meta { color: #a2a8a4; }
.lesson-card input:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.schedule-legend { display: flex; justify-content: flex-end; gap: 17px; margin-top: 18px; color: #8b9590; font-size: 9px; }
.schedule-legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--white); border: 1px solid #9fac9f; }
.legend-dot.selected { border-color: var(--green); background: var(--green); }
.legend-dot.occupied { border-color: #d4d8d2; background: #d4d8d2; }

.teacher-status { margin-top: 20px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.55); }
.teacher-status summary { padding: 17px 21px; display: flex; justify-content: space-between; cursor: pointer; list-style: none; font-size: 12px; font-weight: 600; }
.teacher-status summary::-webkit-details-marker { display: none; }
.summary-action { color: #7f8a84; font-size: 10px; font-weight: 400; }
.teacher-status[open] .summary-action { font-size: 0; }
.teacher-status[open] .summary-action::after { content: "收起名单"; font-size: 10px; }
.teacher-status-grid { padding: 0 21px 20px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.teacher-chip { min-width: 0; padding: 10px 11px; display: flex; align-items: center; gap: 7px; border: 1px solid #e1e5de; border-radius: 8px; background: var(--white); color: #67736d; font-size: 11px; text-align: left; }
.teacher-chip:hover { border-color: #aab8b0; }
.teacher-chip .teacher-chip-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: #d1d6cf; }
.teacher-chip.booked .teacher-chip-dot { background: #569263; }
.teacher-chip .teacher-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-chip small { margin-left: auto; color: #9aa39e; font-size: 9px; }
.teacher-chip.booked small { color: #64816a; }

.help-strip { margin-top: 20px; padding: 0 4px; display: flex; align-items: center; gap: 13px; color: #7e8983; font-size: 11px; line-height: 1.6; }
.help-label { flex: 0 0 auto; color: #55665e; font-weight: 650; }
.help-strip p { margin: 0; }

footer { max-width: 1184px; margin: 0 auto; padding: 20px 32px 30px; display: flex; justify-content: space-between; border-top: 1px solid #e0e4dc; color: #939c97; font-size: 10px; }

.toast { position: fixed; z-index: 20; left: 50%; bottom: 28px; max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 10px; background: #173e34; color: var(--white); box-shadow: 0 10px 35px rgba(16, 59, 49, 0.22); font-size: 12px; opacity: 0; transform: translate(-50%, 15px); pointer-events: none; transition: opacity 200ms, transform 200ms; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: #85453c; }
.noscript { position: fixed; inset: auto 0 0; padding: 15px; background: #85453c; color: white; text-align: center; }

@media (max-width: 850px) {
  .hero { padding: 40px; }
  .progress-card { flex-basis: 240px; }
  .booking-panel { grid-template-columns: 250px minmax(0, 1fr); }
  .teacher-sidebar { padding: 26px 20px; }
  .schedule-area { padding: 26px 22px 20px; }
  .lesson-card { grid-template-columns: 20px 86px minmax(0, 1fr); gap: 10px; }
  .lesson-badge { grid-column: 3; justify-self: start; margin-top: -3px; }
  .teacher-status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .topbar { height: 68px; padding: 0 18px; }
  .brand-name { font-size: 15px; }
  .open-badge { padding: 7px 10px; font-size: 10px; }
  .page-shell { padding: 5px 14px 35px; }
  .hero { min-height: auto; padding: 32px 25px 26px; flex-direction: column; align-items: stretch; gap: 28px; border-radius: 20px; }
  .hero h1 { font-size: 39px; }
  .hero-description { font-size: 13px; }
  .progress-card { flex-basis: auto; padding: 19px 21px; }
  .progress-number { margin-top: 8px; }
  .progress-number strong { font-size: 38px; }
  .progress-card > p { margin-bottom: 13px; }
  .notice { padding: 16px; display: grid; grid-template-columns: 28px 1fr; gap: 12px; }
  .notice-divider { width: 100%; height: 1px; margin: 0; grid-column: 1 / -1; }
  .booking-panel { display: flex; flex-direction: column; border-radius: 16px; }
  .teacher-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 25px 22px; }
  .field-label { margin-top: 21px; }
  .selection-summary { min-height: 0; }
  .summary-empty { min-height: 100px; }
  .schedule-area { padding: 25px 18px 20px; }
  .day-tab { min-width: 96px; }
  .lesson-card { grid-template-columns: 19px 82px minmax(0, 1fr); padding: 13px 12px; gap: 9px; }
  .lesson-info strong { font-size: 13px; }
  .lesson-badge { grid-column: 2 / 4; margin-left: 0; }
  .schedule-legend { justify-content: flex-start; flex-wrap: wrap; }
  .teacher-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-strip { align-items: flex-start; flex-direction: column; gap: 3px; padding: 0 5px; }
  footer { margin: 0 14px; padding: 20px 4px; }
}

@media (max-width: 390px) {
  .brand-name span { display: none; }
  .hero h1 { font-size: 35px; }
  .lesson-card { grid-template-columns: 18px 72px minmax(0, 1fr); }
  .lesson-time strong { font-size: 12px; }
  .lesson-meta { gap: 4px; }
  .teacher-status-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
