/* Study-only colour direction: quiet lilac -> soft white. */
body[data-task-source="study"] {
  --study-lilac: #c7b8ea;
  --study-lilac-deep: #76678f;
  --study-ink: #36323b;
  --study-muted: #77727c;
  --study-line: rgba(104, 91, 99, 0.12);
  --ink: var(--study-ink);
  --muted: var(--study-muted);
  --line: var(--study-line);
  min-height: 100vh;
  background:
    radial-gradient(ellipse 74% 58% at 3% -8%, rgba(199, 184, 234, .42), transparent 70%),
    radial-gradient(ellipse 70% 62% at 98% 108%, rgba(232, 222, 246, .46), transparent 72%),
    linear-gradient(145deg, #eee8f8 0%, #fdfbff 52%, #f3eef9 100%) !important;
  background-attachment: fixed;
}

body[data-task-source="study"] .feature-page {
  position: relative;
}

body[data-task-source="study"] .back {
  color: var(--study-lilac-deep) !important;
}

body[data-task-source="study"] .eyebrow,
body[data-task-source="study"] .feature-grid article > span {
  color: #8b6a82 !important;
}

body[data-task-source="study"] .feature-page h1 {
  color: #312e35 !important;
}

body[data-task-source="study"] .intro {
  color: #777178;
}

body[data-task-source="study"] .feature-grid > article {
  border-color: rgba(255, 255, 255, 0.82) !important;
  background:
    radial-gradient(circle at 7% 4%, rgba(205, 191, 235, .28), transparent 38%),
    radial-gradient(circle at 96% 102%, rgba(233, 224, 247, .36), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(250, 247, 255, .76)) !important;
  box-shadow:
    0 18px 48px rgba(83, 67, 77, 0.09),
    0 2px 8px rgba(83, 67, 77, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
}

body[data-task-source="study"] .feature-grid > article:nth-child(2) {
  background:
    radial-gradient(circle at 96% 4%, rgba(221, 210, 243, .34), transparent 40%),
    radial-gradient(circle at 5% 102%, rgba(202, 185, 234, .22), transparent 42%),
    linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(250, 247, 255, .76)) !important;
}

body[data-task-source="study"] .placeholder-row {
  border-color: rgba(111, 96, 104, 0.12) !important;
}

body[data-task-source="study"] #today-tasks {
  scrollbar-color: rgba(152, 120, 143, 0.48) transparent;
}

body[data-task-source="study"] #today-tasks::-webkit-scrollbar-thumb {
  background: rgba(152, 120, 143, 0.48);
}

body[data-task-source="study"] .task-row .start-task {
  background: rgba(206, 147, 191, 0.17) !important;
  color: #76546d !important;
}

body[data-task-source="study"] #today-tasks .complete-task {
  border-color: rgba(183, 208, 122, 0.72);
  background: rgba(234, 242, 214, 0.82);
}

body[data-task-source="study"] #add-study-goal {
  border: 1px solid rgba(255, 255, 255, 0.78) !important;
  background: linear-gradient(135deg, #ddd3f2 0%, #f1ebfa 52%, #e6dff5 100%) !important;
  color: #62575e !important;
  box-shadow:
    0 8px 18px rgba(105, 91, 99, 0.075),
    inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

body[data-task-source="study"] dialog form > button[type="submit"] {
  background: linear-gradient(135deg, #a87598 0%, #8c9f59 100%) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(111, 98, 84, 0.14);
}

body[data-task-source="study"] .study-tool-link {
  border-color: rgba(153, 119, 145, 0.22);
  background: rgba(255, 252, 249, 0.62);
  color: #72566d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

body[data-task-source="study"] .study-tool-link span {
  background: linear-gradient(145deg, rgba(224, 184, 214, 0.76), rgba(218, 231, 185, 0.78));
}

body[data-task-source="study"] .study-tool-link small,
body[data-task-source="study"] .feature-page .intro .quote-zh {
  color: #8d858b;
}

body[data-task-source="study"] .study-energy .vine-trunk,
body[data-task-source="study"] .study-energy .vine-branch {
  filter: drop-shadow(0 0 3px rgba(172, 132, 161, 0.18));
}

@media (hover: hover) and (pointer: fine) {
  body[data-task-source="study"] .task-row .start-task:hover {
    background: rgba(206, 147, 191, 0.26) !important;
  }

  body[data-task-source="study"] #today-tasks .complete-task:hover {
    border-color: #a7bf6e;
    background: rgba(224, 236, 196, 0.94);
  }

  body[data-task-source="study"] #add-study-goal:hover {
    border-color: rgba(255, 255, 255, 0.94) !important;
    background: linear-gradient(135deg, #d3c6ed 0%, #ece5f8 52%, #ded4f1 100%) !important;
    box-shadow:
      0 10px 22px rgba(105, 91, 99, 0.1),
      inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
  }

  body[data-task-source="study"] .study-tool-link:hover {
    background: rgba(255, 253, 249, 0.82);
    box-shadow: 0 8px 18px rgba(91, 74, 84, 0.08);
  }
}

@media (max-width: 650px) {
  body[data-task-source="study"] {
    background:
      radial-gradient(ellipse 96% 48% at 2% -4%, rgba(199, 184, 234, .4), transparent 72%),
      radial-gradient(ellipse 92% 48% at 100% 104%, rgba(232, 222, 246, .44), transparent 72%),
      linear-gradient(155deg, #eee8f8 0%, #fdfbff 52%, #f3eef9 100%) !important;
  }

  body[data-task-source="study"] .feature-grid > article {
    -webkit-backdrop-filter: blur(14px) saturate(108%);
    backdrop-filter: blur(14px) saturate(108%);
    box-shadow:
      0 14px 34px rgba(83, 67, 77, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.9);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-task-source="study"] {
    background-attachment: scroll;
  }
}
/* Completion control: the surface stays quiet; only the checkmark changes. */
body[data-task-source="study"] #today-tasks .complete-task,
body[data-task-source="study"] #today-tasks .completed-task .complete-task {
  border-color: rgba(150, 205, 191, .72) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #dff2ed 0%, #f9fcfc 52%, #e5f2e3 100%) !important;
  color: #4c897b !important;
  text-shadow: none !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 4px 10px rgba(69, 139, 119, .08) !important;
  transition: transform 140ms cubic-bezier(.23, 1, .32, 1), background 180ms ease, border-color 180ms ease, color 160ms ease, box-shadow 180ms ease;
}

body[data-task-source="study"] #today-tasks .complete-task[aria-pressed="false"] {
  color: transparent !important;
}

body[data-task-source="study"] #today-tasks .complete-task[aria-pressed="true"] {
  color: #4c897b !important;
}

body[data-task-source="study"] #today-tasks .complete-task:active {
  transform: scale(.96);
}

@media (hover: hover) and (pointer: fine) {
  body[data-task-source="study"] #today-tasks .complete-task:hover {
    background: linear-gradient(135deg, #d5eee7 0%, #f6fbfb 52%, #dcefdc 100%) !important;
  }
}
