/* 每日一学 (Daily Learn): the flame in the top bar, its pop-up, and the card
   with the date, time left, month calendar, today's lesson and the streak.
   Learned days are green; nothing marks a day without learning. */

/* the flame and the streak number in the top bar */
.streak-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 9px; border: 0; border-radius: 8px; background: none;
  color: var(--muted); font-weight: 650; font-size: .9rem; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .15s, color .15s;
}
.streak-btn svg.i { width: 19px; height: 19px; }
.streak-btn:hover, .streak-btn[aria-expanded="true"] { background: var(--btn); color: var(--text); }
.streak-btn.on { color: var(--text); }
.streak-btn.on svg.i { color: var(--flame); fill: currentColor; }
.streak-btn.pop svg.i { animation: flame-pop .8s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes flame-pop { 0% { transform: scale(.5); } 55% { transform: scale(1.35); } 100% { transform: scale(1); } }
.daily-pop { position: fixed; z-index: 45; animation: pop .18s ease-out; }
.daily-pop .daily-card { box-shadow: var(--sh-3); }

/* the card */
.daily-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px 14px; box-shadow: var(--sh-1); }
.daily-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.daily-when { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.daily-when b { width: 100%; font-size: 1rem; font-weight: 650; }
.daily-date { font-weight: 650; font-size: .92rem; }
.daily-left { color: var(--faint); font-size: .8rem; font-variant-numeric: tabular-nums; }
.daily-flag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--s-green-soft); color: var(--s-green); font-size: .76rem; font-weight: 650; white-space: nowrap; }
.daily-flag svg.i { width: 12px; height: 12px; stroke-width: 3; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 6px 0 4px; font-size: .86rem; font-weight: 600; }
.icon-btn { width: 28px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.icon-btn svg.i { width: 16px; height: 16px; }
.icon-btn:hover:not(:disabled) { background: var(--btn); color: var(--text); }
.icon-btn:disabled { opacity: .3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; text-align: center; }
.cal-wd { padding: 2px 0 4px; font-size: .72rem; color: var(--faint); }
.cal-day { display: grid; place-items: center; height: 34px; font-size: .84rem; font-variant-numeric: tabular-nums; }
.cal-day span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; }
.cal-day.future { color: var(--faint); }
.cal-day.on span { background: var(--s-green-soft); color: var(--s-green); font-weight: 650; }
.cal-day.today span { box-shadow: inset 0 0 0 1.5px var(--text); font-weight: 650; }
.cal-day.today.on span { background: var(--s-green); color: var(--surface); box-shadow: none; }
.daily-pick { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 12px 0; border-top: 1px solid var(--border); }
.daily-pick-txt { flex: 1; min-width: 0; display: grid; line-height: 1.35; }
.daily-pick-txt small { color: var(--muted); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-pick-txt a { font-weight: 600; font-size: .92rem; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.daily-pick-txt a:hover { text-decoration: underline; text-decoration-color: var(--border-strong); }
.daily-pick .btn { flex: none; }
.daily-done { flex: none; display: inline-flex; align-items: center; gap: 4px; color: var(--s-green); font-size: .82rem; font-weight: 650; white-space: nowrap; }
.daily-done svg.i { width: 14px; height: 14px; stroke-width: 3; }
.daily-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: .8rem; }
.daily-streak { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; color: var(--text); }
.daily-streak svg.i { width: 15px; height: 15px; color: var(--faint); }
.daily-streak.on svg.i { color: var(--flame); fill: currentColor; }
.daily-rule { margin: 8px 0 0; color: var(--faint); font-size: .76rem; line-height: 1.5; }
@media (prefers-reduced-motion: reduce) { .streak-btn.pop svg.i, .daily-pop { animation: none; } }
