:root {
  --paper: #f4f0e5;
  --ink: #17362e;
  --muted: #67726c;
  --line: rgba(23, 54, 46, 0.14);
  --cream: #fffdf7;
  --green: #1f5a49;
  --lime: #cbdc8b;
  --orange: #e69d62;
  --blue: #8dbab5;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 92% 2%, rgba(203, 220, 139, 0.32), transparent 25rem),
    var(--paper);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.shell {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
}

.topbar {
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50% 50% 46% 54%;
  color: var(--paper);
  background: var(--green);
  transform: rotate(-8deg);
}

.avatar {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: var(--lime);
  cursor: pointer;
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding: 72px 0 45px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: Georgia, "Songti SC", serif;
  font-weight: 500;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(42px, 7vw, 75px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.hero > div > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.streak {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 150px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 247, 0.58);
}

.streak-icon {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--orange);
}

.streak div {
  display: flex;
  flex-direction: column;
}

.streak strong {
  font-family: Georgia, serif;
  font-size: 24px;
}

.streak div span {
  color: var(--muted);
  font-size: 11px;
}

.progress-card {
  padding: 23px 26px;
  border-radius: 22px;
  color: var(--paper);
  background: var(--green);
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 13px;
}

.progress-copy strong {
  font-size: 15px;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  transition: width 420ms ease;
}

.progress-card p {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.tasks-section {
  padding: 70px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-heading h2,
.tomorrow-card h2 {
  margin-bottom: 0;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.section-heading > span {
  color: var(--muted);
  font-size: 13px;
}

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

.task-card {
  position: relative;
  display: grid;
  grid-template-columns: 60px 1fr 150px;
  min-height: 210px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 253, 247, 0.72);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.task-card:hover {
  transform: translateY(-2px);
  background: var(--cream);
}

.task-card.completed {
  opacity: 0.68;
}

.task-card.completed::after {
  content: "已完成";
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 7px 10px;
  border-radius: 99px;
  color: var(--paper);
  background: var(--green);
  font-size: 11px;
}

.task-number {
  padding: 29px 0 0 23px;
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 13px;
}

.task-body {
  align-self: center;
  padding: 28px 35px 28px 0;
}

.task-tag {
  display: inline-block;
  margin-bottom: 15px;
  padding: 7px 10px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
}

.task-tag.math {
  background: rgba(230, 157, 98, 0.21);
}

.task-tag.reading {
  background: rgba(203, 220, 139, 0.44);
}

.task-tag.science {
  background: rgba(141, 186, 181, 0.3);
}

.task-card h3 {
  margin-bottom: 9px;
  font-family: Georgia, "Songti SC", serif;
  font-size: 25px;
  font-weight: 500;
}

.task-card p {
  max-width: 560px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.task-button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.task-button span {
  margin-left: 6px;
}

.task-visual {
  display: grid;
  place-items: center;
  margin: 18px;
  border-radius: 18px;
  font-family: Georgia, serif;
  font-size: 70px;
}

.math-visual {
  background: #f2c5a0;
}

.reading-visual {
  background: #dbe7aa;
}

.science-visual {
  color: #f8fbf7;
  background: #9bc8c2;
}

.tomorrow-card {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 80px;
  padding: 34px;
  border: 1px dashed rgba(23, 54, 46, 0.28);
  border-radius: 24px;
}

.tomorrow-card .lock {
  display: grid;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  color: var(--paper);
  background: var(--ink);
  font-size: 28px;
}

.tomorrow-card h2 {
  margin-bottom: 8px;
  font-size: 27px;
}

.tomorrow-card p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 0 38px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

dialog {
  width: min(580px, calc(100% - 30px));
  padding: 0;
  border: 0;
  border-radius: 28px;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 30px 90px rgba(23, 54, 46, 0.25);
}

dialog::backdrop {
  background: rgba(17, 37, 31, 0.58);
  backdrop-filter: blur(4px);
}

.lesson-modal {
  position: relative;
  padding: 34px;
}

.close-button {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  font-size: 21px;
  cursor: pointer;
}

.lesson-modal h2 {
  margin-bottom: 22px;
  font-size: 34px;
}

.video-placeholder {
  display: grid;
  min-height: 230px;
  place-items: center;
  align-content: center;
  gap: 14px;
  border-radius: 20px;
  color: var(--paper);
  background:
    radial-gradient(circle at 70% 20%, rgba(203, 220, 139, 0.25), transparent 8rem),
    var(--green);
}

.video-placeholder button {
  width: 66px;
  height: 66px;
  padding-left: 5px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  color: var(--ink);
  background: var(--lime);
  cursor: pointer;
}

.video-placeholder span {
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
}

.question {
  display: grid;
  gap: 10px;
  padding: 24px 0 5px;
}

.question p {
  margin-bottom: 4px;
  font-weight: 700;
  line-height: 1.55;
}

.question label {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.complete-button {
  width: 100%;
  margin-top: 22px;
  padding: 15px;
  border: 0;
  border-radius: 13px;
  color: var(--paper);
  background: var(--green);
  font-weight: 750;
  cursor: pointer;
}

.complete-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100% - 40px));
  padding: 14px 18px;
  border-radius: 13px;
  color: var(--paper);
  background: var(--ink);
  box-shadow: 0 15px 40px rgba(23, 54, 46, 0.25);
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 700px) {
  .shell {
    width: min(100% - 24px, 620px);
  }

  .topbar {
    height: 70px;
  }

  .hero {
    align-items: start;
    padding: 45px 0 28px;
  }

  .streak {
    min-width: auto;
    padding: 11px;
  }

  .streak-icon {
    display: none;
  }

  .streak div span {
    display: none;
  }

  .task-card {
    grid-template-columns: 42px 1fr;
    min-height: 0;
  }

  .task-number {
    padding-left: 15px;
  }

  .task-body {
    padding-right: 18px;
  }

  .task-visual {
    display: none;
  }

  .section-heading > span {
    display: none;
  }

  .tomorrow-card {
    padding: 25px 20px;
  }

  .tomorrow-card .lock {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
  }

  footer {
    gap: 10px;
    flex-direction: column;
  }
}

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