/* 今天作业 — 在 english.css 儿童风基础上的补充(english.css 已声明 color-scheme: light,深色模式下仍是浅色页面) */
:root { --bg1: #FFF6E0; --bg2: #E6F6FF; }
.view--hw { max-width: 1080px; margin: 0 auto; }
.brand__date { font-size: 15px; font-weight: 600; color: var(--ink2); margin-left: 4px; white-space: nowrap; }
.stat--btn { cursor: pointer; font-family: inherit; color: var(--ink); white-space: nowrap; }
.stat--exit { white-space: nowrap; }

/* 日期条 */
.daybar { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; margin: 12px 0 4px; }
.daybar__btn { border: 0; border-radius: 999px; min-height: 48px; padding: 0 18px; font-size: 17px; font-weight: 700; background: #fff; color: var(--ink); box-shadow: 0 4px 0 #EFE4D6; white-space: nowrap; }
.daybar__btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 #EFE4D6; }
.daybar__btn:disabled { opacity: .35; }
.daybar__mid { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.daybar__date { font-size: clamp(19px, 2.6vw, 24px); font-weight: 800; text-align: center; }
.daybar__tag { display: inline-block; margin-left: 6px; padding: 2px 10px; border-radius: 999px; font-size: 14px; background: var(--orange); color: #fff; vertical-align: 2px; }
.daybar__tag--past { background: #B9AECB; }
.daybar__tag--future { background: var(--blue); }
.daybar__today { border: 0; background: none; color: var(--blue-d); font-size: 16px; font-weight: 700; padding: 6px 10px; min-height: 36px; }

/* 进度 */
.prog { display: flex; align-items: center; gap: 12px; margin: 0 4px 14px; }
.prog__bar, .hday__bar { flex: 1; height: 14px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 2px #F1E5D6; overflow: hidden; }
.prog__bar i, .hday__bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7BE0B8, var(--green)); transition: width .35s ease; }
.prog__num { font-size: 17px; font-weight: 800; color: var(--ink2); white-space: nowrap; }
.prog__num b { color: var(--green-d); font-size: 22px; }

/* 科目分组 */
.groups { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1000px) { .groups--multi { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.group { min-width: 0; }
.group__head { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; font-size: 22px; font-weight: 800; color: var(--c-d); }
.group__emoji { width: 44px; height: 44px; border-radius: 16px; display: grid; place-items: center; font-size: 24px; background: var(--c); box-shadow: 0 4px 0 var(--c-d); }
.group__count { margin-left: auto; font-size: 15px; font-weight: 700; color: var(--ink2); }
.group__list { display: flex; flex-direction: column; gap: 12px; }

/* 作业卡片 */
.hw { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 16px 16px 18px; border-left: 10px solid var(--c); display: flex; flex-direction: column; gap: 10px; min-width: 0; transition: background .25s, border-color .25s; }
.hw.is-done { background: #F1FFF7; border-left-color: var(--green); }
.hw__head { display: flex; align-items: flex-start; gap: 10px; }
.hw__title { flex: 1; min-width: 0; margin: 0; font-size: clamp(20px, 2.6vw, 24px); line-height: 1.4; font-weight: 800; overflow-wrap: anywhere; }
.hw.is-done .hw__title { color: var(--green-d); }
.hw__badge { flex: none; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 800; background: #FFF1D6; color: var(--orange-d); white-space: nowrap; margin-top: 3px; }
.hw.is-done .hw__badge { background: var(--green); color: #fff; }
.hw__more { align-self: flex-start; border: 0; background: #F6F1FA; color: var(--ink2); border-radius: 999px; padding: 0 16px; min-height: 44px; font-size: 15px; font-weight: 700; }
.hw__detail { margin: 0; padding: 12px 14px; border-radius: 16px; background: #FFF9EC; color: #5E5270; font-size: 17px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; -webkit-user-select: text; user-select: text; }
.hw__items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

/* 勾选行(小项 / 整条) */
.chk { width: 100%; display: flex; align-items: center; gap: 14px; text-align: left; border: 0; border-radius: 18px; min-height: 60px; padding: 8px 14px 8px 10px; background: #FAF7FD; box-shadow: inset 0 0 0 2px #ECE6F4; font-size: clamp(18px, 2.3vw, 21px); line-height: 1.45; color: var(--ink); transition: background .2s, box-shadow .2s; }
.chk:active { transform: scale(.985); }
.chk__box { flex: none; width: 46px; height: 46px; border-radius: 15px; background: #fff; box-shadow: inset 0 0 0 3px #D9D0E6; display: grid; place-items: center; font-size: 28px; font-weight: 900; color: transparent; transition: background .2s, box-shadow .2s, transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.chk__text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.chk.is-on { background: #E4F9EE; box-shadow: inset 0 0 0 2px #BFE9D2; }
.chk.is-on .chk__box { background: var(--green); box-shadow: 0 3px 0 var(--green-d); color: #fff; transform: scale(1.06); }
.chk.is-on .chk__text { color: var(--green-d); text-decoration: line-through; text-decoration-color: rgba(22, 154, 110, .45); }
.chk--whole { justify-content: center; background: var(--orange); box-shadow: 0 5px 0 var(--orange-d); color: #fff; font-weight: 800; min-height: 64px; }
.chk--whole .chk__text { flex: none; }
.chk--whole .chk__box { box-shadow: none; }
.chk--whole.is-on { background: var(--green); box-shadow: 0 5px 0 var(--green-d); }
.chk--whole.is-on .chk__box { background: #fff; color: var(--green-d); box-shadow: none; }
.chk--whole.is-on .chk__text { color: #fff; text-decoration: none; }
.hw__go { display: flex; align-items: center; justify-content: center; text-decoration: none; text-align: center; min-height: 56px; font-size: 19px; }

/* 空状态 / 全部完成 */
.empty { text-align: center; padding: 34px 18px; background: rgba(255, 255, 255, .78); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty__art { font-size: 72px; line-height: 1.1; }
.empty__title { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin: 8px 0 6px; }
.empty__sub { color: var(--ink2); font-size: 17px; margin: 0; line-height: 1.6; }
.cheer { text-align: center; margin: 18px 0 0; font-size: 20px; font-weight: 800; color: var(--green-d); }
.hw-foot { display: flex; justify-content: center; margin-top: 22px; }

/* 历史记录 */
.hdays { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) { .hdays { grid-template-columns: 1fr 1fr; } }
.hday { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; text-align: left; border: 0; border-radius: 22px; background: #fff; box-shadow: var(--shadow); padding: 16px 18px; min-height: 84px; color: var(--ink); }
.hday:active { transform: translateY(2px); }
.hday.is-all { background: #F1FFF7; }
.hday__date { font-size: 20px; font-weight: 800; }
.hday__date small { font-size: 14px; color: var(--ink2); font-weight: 600; margin-left: 6px; }
.hday__num { font-size: 20px; font-weight: 800; color: var(--orange-d); white-space: nowrap; }
.hday.is-all .hday__num { color: var(--green-d); }
.hday__bar { grid-column: 1 / -1; background: #F6F1EA; box-shadow: none; }

@media (max-width: 560px) {
  .brand { font-size: 21px; gap: 4px; flex-wrap: wrap; }
  .brand__logo { font-size: 30px; }
  .brand__date { display: none; }
  .stat { padding: 8px 11px; font-size: 15px; }
  .daybar { gap: 6px; }
  .daybar__btn { padding: 0 12px; font-size: 15px; }
  .hw { padding: 14px 12px 14px 12px; border-left-width: 8px; }
  .mascot--hero .mascot__fox { font-size: 60px; }
}

/* 与 math.css 同款紫色按钮(这里不引 math.css) */
.btn--purple { background: #9B7BFF; box-shadow: 0 5px 0 #7355E0; }
.btn--purple:active:not(:disabled) { box-shadow: 0 1px 0 #7355E0; }

.view--hw .mascot { margin-top: 18px; }

/* 每日自动练习作业的提示 */
.hw__auto { margin: 2px 0 6px; padding: 6px 12px; border-radius: 12px; background: #FFF6DC; color: #8A6A1E; font-size: 14px; }
