:root {
  --ink: #14324c;
  --ink-soft: #446176;
  --paper: #f7f2e7;
  --paper-deep: #efe6d3;
  --line: rgba(20, 50, 76, 0.14);
  --green: #24483d;
  --green-soft: #dce7dd;
  --orange: #d9752f;
  --orange-soft: #fff0e3;
  --navy: #123153;
  --white: rgba(255, 255, 255, 0.86);
  --shadow: 0 20px 50px rgba(18, 49, 83, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(217, 117, 47, 0.16), transparent 26%),
    radial-gradient(circle at bottom right, rgba(36, 72, 61, 0.16), transparent 28%),
    linear-gradient(180deg, #f9f5ea 0%, #f3eddc 100%);
}

.paper-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(18, 49, 83, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 49, 83, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  margin-bottom: 18px;
}

.hero-copy,
.hero-note,
.panel {
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero-copy {
  padding: 28px 28px 24px;
  border-radius: 28px;
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -35px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(217, 117, 47, 0.2), transparent 68%);
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: 0.04em;
}

.hero-summary {
  margin: 0;
  max-width: 720px;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.8;
}

.hero-note {
  border-radius: 24px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, rgba(18, 49, 83, 0.92), rgba(18, 49, 83, 0.84));
  color: #fff;
}

.note-title {
  font-size: 13px;
  letter-spacing: 0.16em;
  opacity: 0.72;
  margin-bottom: 10px;
}

.note-text {
  font-size: 16px;
  line-height: 1.8;
}

.planner-layout {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr) 360px;
  grid-template-areas:
    "student calendar detail"
    "goal calendar reminder";
  gap: 18px;
  align-items: start;
}

.student-panel {
  grid-area: student;
}

.calendar-column {
  grid-area: calendar;
  display: grid;
  gap: 18px;
}

.detail-panel {
  grid-area: detail;
}

.panel {
  border-radius: 24px;
  padding: 22px;
}

.toolbar-panel {
  padding: 18px 20px;
}

.section-kicker {
  color: var(--orange);
  font-size: 12px;
  letter-spacing: 0.16em;
  margin-bottom: 10px;
}

.section-title {
  margin: 0 0 8px;
  font-size: 30px;
  letter-spacing: 0.03em;
}

.section-summary {
  color: var(--ink-soft);
  line-height: 1.8;
  font-size: 15px;
  margin-bottom: 18px;
}

.student-list {
  display: grid;
  gap: 12px;
  margin-bottom: 18px;
}

.student-card {
  width: 100%;
  border: 1px solid rgba(18, 49, 83, 0.12);
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.student-card.active {
  border-color: rgba(217, 117, 47, 0.5);
  box-shadow: 0 16px 30px rgba(217, 117, 47, 0.18);
  transform: translateY(-1px);
  background: linear-gradient(180deg, #fffaf4 0%, #fff 100%);
}

.student-name {
  font-size: 22px;
  margin: 0 0 8px;
}

.student-meta,
.student-focus,
.tiny-note,
.task-note,
.day-meta,
.reminder-meta {
  color: var(--ink-soft);
  line-height: 1.7;
  font-size: 14px;
}

.student-focus {
  margin-top: 10px;
}

.stat-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.stat-box {
  border-radius: 16px;
  padding: 14px;
  background: rgba(18, 49, 83, 0.06);
}

.stat-label {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--navy);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 18px;
}

.calendar-title {
  margin: 0;
  font-size: 34px;
}

.calendar-hint {
  color: var(--ink-soft);
  font-size: 14px;
}

.toolbar-grid {
  display: grid;
  gap: 16px;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar-label {
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  min-width: 72px;
}

.toolbar-chip,
.toolbar-action {
  border: 1px solid rgba(18, 49, 83, 0.12);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  line-height: 1.2;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.toolbar-chip.active,
.toolbar-action.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.toolbar-chip:hover,
.toolbar-action:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 117, 47, 0.4);
}

.toolbar-action {
  background: var(--orange-soft);
  color: var(--orange);
  border-color: rgba(217, 117, 47, 0.22);
}

.toolbar-summary {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

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

.weekday {
  text-align: center;
  color: var(--ink-soft);
  font-size: 13px;
  padding: 8px 0;
}

.day-cell {
  min-height: 116px;
  border-radius: 16px;
  border: 1px solid rgba(18, 49, 83, 0.08);
  background: rgba(255, 255, 255, 0.9);
  padding: 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.day-cell.blank {
  border-style: dashed;
  background: rgba(18, 49, 83, 0.03);
  cursor: default;
}

.day-cell.has-event {
  background: linear-gradient(180deg, #fffef8 0%, #fff7ed 100%);
}

.day-cell.selected {
  border-color: rgba(217, 117, 47, 0.6);
  background: linear-gradient(180deg, #fff8ef 0%, #fff0df 100%);
  transform: translateY(-1px);
}

.day-cell.muted {
  opacity: 0.38;
}

.day-number {
  font-size: 20px;
  font-weight: 700;
  color: var(--navy);
}

.day-badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--orange-soft);
  color: var(--orange);
  font-size: 12px;
}

.calendar-meta {
  margin-top: 10px;
  width: 100%;
  display: grid;
  gap: 8px;
}

.day-course-list {
  display: grid;
  gap: 4px;
  width: 100%;
}

.day-course-item {
  width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(36, 72, 61, 0.08);
  color: var(--green);
  font-size: 12px;
  line-height: 1.45;
  text-align: left;
  word-break: break-all;
}

.detail-card {
  padding: 16px;
  border-radius: 18px;
  background: rgba(18, 49, 83, 0.05);
  margin-bottom: 12px;
}

.detail-date {
  margin: 0 0 10px;
  font-size: 28px;
}

.course-list,
.goal-list,
.task-list,
.reminder-list {
  display: grid;
  gap: 12px;
}

.course-item,
.goal-item,
.task-item,
.reminder-item {
  border: 1px solid rgba(18, 49, 83, 0.08);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
}

.course-title,
.task-title,
.reminder-title {
  margin: 0 0 8px;
  font-size: 18px;
}

.goal-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.goal-index {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-size: 13px;
  flex: none;
}

.empty-state {
  border: 1px dashed rgba(18, 49, 83, 0.18);
  border-radius: 18px;
  padding: 18px;
  color: var(--ink-soft);
  line-height: 1.8;
  background: rgba(255, 255, 255, 0.54);
}

.panel-divider {
  height: 1px;
  background: rgba(18, 49, 83, 0.08);
  margin: 18px 0;
}

.footer-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--ink-soft);
}

.goal-panel {
  grid-area: goal;
}

.reminder-panel {
  grid-area: reminder;
}

@media (max-width: 1180px) {
  .planner-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "student"
      "calendar"
      "detail"
      "goal"
      "reminder";
  }

  .hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .site-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .hero-copy,
  .hero-note,
  .panel {
    border-radius: 20px;
    padding: 18px;
  }

  .toolbar-panel {
    padding: 16px;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero-summary {
    font-size: 16px;
  }

  .section-title {
    font-size: 26px;
  }

  .calendar-title,
  .detail-date {
    font-size: 28px;
  }

  .weekday-row,
  .calendar-grid {
    gap: 6px;
  }

  .toolbar-label {
    min-width: auto;
    width: 100%;
  }

  .toolbar-chip,
  .toolbar-action {
    font-size: 13px;
    padding: 8px 12px;
  }

  .weekday {
    font-size: 12px;
  }

  .day-cell {
    min-height: 88px;
    padding: 8px;
  }

  .day-number {
    font-size: 18px;
  }

  .day-badge {
    margin-top: 8px;
    padding: 3px 8px;
  }

  .calendar-meta {
    margin-top: 8px;
    gap: 6px;
  }

  .day-course-item {
    padding: 5px 7px;
    font-size: 11px;
  }
}
