/* 孩子端样式：大按钮、可爱配色、适合手机 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* 保证 hidden 属性始终生效（避免被 display:flex 等覆盖导致弹窗常显） */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  background: linear-gradient(180deg, #EDE7FF 0%, #F6F3FF 40%, #FFF9F2 100%);
  min-height: 100vh;
  color: #333;
}

/* 头部 */
.kid-head { padding: 22px 18px 14px; color: #fff; background: linear-gradient(135deg,#7C4DFF,#B388FF); border-radius: 0 0 26px 26px; box-shadow: 0 6px 18px rgba(124,77,255,.28); }
.kid-date { font-size: 19px; font-weight: 700; }
.kid-count { margin-top: 8px; font-size: 16px; }
.kid-count b { font-size: 24px; }
.kid-progress { margin-top: 10px; height: 14px; border-radius: 8px; background: rgba(255,255,255,.3); overflow: hidden; }
.kid-progress i { display: block; height: 100%; background: linear-gradient(90deg,#FFD54F,#FF9E2C); border-radius: 8px; transition: width .4s ease; }

/* 主体 */
.kid-main { padding: 16px 14px 96px; }
.kid-empty { text-align: center; padding-top: 60px; color: #7a6fa8; }
.empty-ico { font-size: 60px; }
.kid-empty .sub { font-size: 13px; color: #aaa0cc; }

/* 任务卡片 */
.task-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.task-card { display: flex; gap: 12px; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 3px 12px rgba(90,60,170,.08); border-left: 6px solid #B388FF; transition: opacity .2s; }
.task-card.done { border-left-color: #43A047; opacity: .82; }
.task-card.done .task-title { text-decoration: line-through; color: #999; }
.task-ico { font-size: 30px; line-height: 1; flex-shrink: 0; width: 40px; text-align: center; padding-top: 4px; }
/* 勾选框：勾=已完成，取消勾=未完成 */
.tick { flex-shrink: 0; width: 46px; display: flex; align-items: flex-start; justify-content: center; padding-top: 3px; cursor: pointer; }
.tick-input { position: absolute; opacity: 0; pointer-events: none; }
.tickbox { width: 30px; height: 30px; border-radius: 50%; border: 3px solid #C0ACF5; background: #fff; display: inline-flex; align-items: center; justify-content: center; color: #fff; }
.tick input:checked + .tickbox { background: linear-gradient(135deg, #66BB6A, #43A047); border-color: #43A047; box-shadow: 0 2px 6px rgba(67,160,71,.35); }
.tick input:checked + .tickbox::after { content: "\2713"; font-size: 18px; font-weight: 800; }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 17px; font-weight: 700; line-height: 1.4; }
.badge { display: inline-block; background: #EDE7FF; color: #6A42C8; font-size: 12px; padding: 1px 8px; border-radius: 10px; margin-right: 6px; vertical-align: 1px; }
.tag-print { display: inline-block; background: #FFF3D6; color: #B26A00; font-size: 12px; padding: 1px 8px; border-radius: 10px; margin-left: 6px; }
.task-note { font-size: 14px; color: #666; margin-top: 6px; line-height: 1.5; }
.task-note.warn { color: #C77700; }
.task-meta { font-size: 13px; color: #8a8aa0; margin-top: 4px; }

/* 文件区 */
.file-list { margin-top: 10px; background: #F7F4FF; border-radius: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.file-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-ico { font-size: 18px; }
.file-name { font-size: 13px; color: #555; flex: 1; min-width: 100px; word-break: break-all; }
.file-name em { color: #999; font-style: normal; }
.btn-mini { font-size: 13px; text-decoration: none; background: #fff; color: #6A42C8; border: 1px solid #C9B8FF; border-radius: 14px; padding: 5px 12px; white-space: nowrap; }

/* 完成按钮 */
.task-foot { margin-top: 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.done-at { font-size: 13px; color: #43A047; }
.btn-done {
  border: 0; cursor: pointer; font-size: 16px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg,#FF9E2C,#FF6F3C);
  border-radius: 24px; padding: 12px 22px; box-shadow: 0 4px 12px rgba(255,111,60,.35);
}
.task-card.done .btn-done { background: linear-gradient(135deg,#66BB6A,#43A047); box-shadow: 0 4px 12px rgba(67,160,71,.3); }

/* 庆祝 */
.celebrate { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.25); }
.cele-inner { background: #fff; text-align: center; font-size: 26px; font-weight: 800; color: #FF8F00; padding: 30px 44px; border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,.2); animation: pop .5s ease; }
.cele-inner span { display: block; font-size: 16px; color: #888; margin-top: 8px; font-weight: 400; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* 撤销弹窗 */
.modal-mask { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; width: 86%; max-width: 340px; border-radius: 20px; padding: 22px; text-align: center; }
.modal-title { font-size: 18px; font-weight: 700; }
.modal-sub { font-size: 13px; color: #888; margin: 8px 0; }
.modal input[type=password] { width: 100%; font-size: 16px; padding: 10px; border: 1px solid #ddd; border-radius: 12px; text-align: center; }
.modal-err { color: #E53935; font-size: 13px; min-height: 18px; margin: 6px 0 2px; }
.modal-btns { display: flex; gap: 10px; margin-top: 8px; }
.modal-btns .btn { flex: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer; font-size: 16px; font-weight: 700; color: #fff; background: linear-gradient(135deg,#7C4DFF,#B388FF); border-radius: 22px; padding: 11px 16px; text-decoration: none; }
.btn-ok { background: linear-gradient(135deg,#7C4DFF,#B388FF); color:#fff; }
.btn-ghost { background: #eee; color: #666; }
.btn-big { font-size: 15px; }

/* 孩子端新交互：多孩/公共作业/工具栏 */
.kid-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kid-switch { border: 0; background: rgba(255,255,255,.22); color: #fff; font-size: 14px; font-weight: 600; border-radius: 16px; padding: 6px 12px; cursor: pointer; }
.public-note { font-size: 14px; opacity: .95; }
.who-card { background: #fff; border-radius: 16px; padding: 14px; margin-bottom: 12px; box-shadow: 0 2px 10px rgba(124,77,255,.15); }
.who-title { font-weight: 700; margin-bottom: 8px; }
.who-form { display: flex; gap: 8px; }
.who-form input { flex: 1; font-size: 16px; padding: 10px; border: 1px solid #D9D2F5; border-radius: 12px; min-width: 0; }
.who-btn { border-radius: 12px; padding: 10px 16px; white-space: nowrap; }
.who-hint { font-size: 12px; color: #999; margin: 8px 0 0; }
.kid-actions { display: flex; gap: 8px; margin: 4px 0 14px; }
.kid-btn { border-radius: 14px; font-size: 14px; padding: 9px 14px; background: linear-gradient(135deg,#7C4DFF,#B388FF); color: #fff; }
.tag-private { display: inline-block; background: #FFE3E3; color: #C0392B; font-size: 12px; padding: 1px 8px; border-radius: 10px; margin-left: 6px; }
.tick-empty { font-size: 18px; padding-top: 8px; }
.btn-mini { cursor: pointer; font-family: inherit; }
@media (max-width: 420px) {
  .kid-main { padding: 12px 10px 90px; }
}
