/* ===== LittleWins 全局样式 ===== */
:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --ink: #2b3145;
  --muted: #8a90a5;
  --line: #e6e9f2;
  --primary: #5b7cfa;
  --primary-dark: #4763d6;
  --ok: #2fa36b;
  --warn: #f0862b;
  --bad: #e05252;
  --gold: #f7b500;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 49, 69, .07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}
img { max-width: 100%; }
a { color: inherit; text-decoration: none; }
h2 { margin: 26px 0 12px; font-size: 20px; }
h3 { margin: 20px 0 10px; font-size: 16px; }
.muted { color: var(--muted); font-weight: normal; }
.pos { color: var(--ok); font-weight: bold; }
.neg { color: var(--bad); font-weight: bold; }

.page { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: min(880px, 94vw); margin: 0 auto; padding-bottom: 60px; flex: 1; }
.wrap.narrow { width: min(560px, 94vw); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ===== 提示条 ===== */
.flash-wrap { width: min(880px, 94vw); margin: 12px auto 0; position: relative; z-index: 30; }
.flash {
  padding: 11px 16px; border-radius: 10px; margin-bottom: 8px;
  font-size: 15px; animation: slideDown .25s ease;
}
.flash-ok { background: #e3f6ec; color: #1c7a4c; border: 1px solid #bfe8d1; }
.flash-bad { background: #fdeaea; color: #b23a3a; border: 1px solid #f3cccc; }
@keyframes slideDown { from { transform: translateY(-8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ===== 按钮 / 表单 ===== */
.btn {
  display: inline-block; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-size: 14px; cursor: pointer; transition: all .15s; text-align: center;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-ok:hover { background: #27895b; color: #fff; border-color: #27895b; }
.btn-warn { color: var(--warn); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); }
.btn-small { padding: 4px 10px; font-size: 13px; border-radius: 8px; }
.btn-big { padding: 12px 22px; font-size: 16px; }
.btn-disabled { opacity: .55; cursor: not-allowed; background: #eee; }
.btn-block { display: block; width: 100%; }
.btn[disabled] { pointer-events: none; }

.form label { display: block; margin: 14px 0 6px; font-size: 14px; color: var(--muted); }
.form input[type="text"], .form input[type="number"], .form input[type="date"],
.form input:not([type]), .form select, .form textarea,
.inline-form input, .inline-form select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 10px; font-size: 15px; background: #fff; color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus,
.inline-form input:focus, .inline-form select:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 124, 250, .15);
}
.form .check { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ink); }
.form button[type="submit"] { margin-top: 18px; width: 100%; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form select { width: auto; }
.inline-form input[name="reason"] { flex: 1; min-width: 180px; }
.inline-form button { width: auto; margin-top: 0 !important; }
.num-s { width: 110px !important; }

/* 图标选择器（任务表单）与头像选择器共用风格 */
.icon-picker, .avatar-picker {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px;
}
.icon-opt, .avatar-opt { position: relative; cursor: pointer; text-align: center; margin: 0 !important; }
.icon-opt input, .avatar-opt input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.icon-opt img { width: 52px; height: 52px; border-radius: 14px; border: 3px solid transparent; transition: all .15s; }
.avatar-opt img { width: 60px; height: 60px; border-radius: 50%; border: 3px solid transparent; transition: all .15s; }
.icon-opt input:checked + img, .avatar-opt input:checked + img { border-color: var(--gold); transform: scale(1.08); }
.icon-opt small { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.task-mini-icon { width: 30px; height: 30px; border-radius: 8px; vertical-align: -8px; margin-right: 8px; }

/* ===== 首页 ===== */
.home { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 16px; }
.home-title { font-size: 40px; margin: 0; letter-spacing: 2px; }
.home-sub { color: var(--muted); margin: 8px 0 40px; }
.home-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 300px)); gap: 24px; width: 100%; justify-content: center; }
.home-card {
  background: var(--card); border-radius: 22px; box-shadow: var(--shadow);
  padding: 44px 20px; text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: 10px; transition: transform .18s, box-shadow .18s;
  border: 2px solid transparent;
}
.home-card:hover { transform: translateY(-6px); box-shadow: 0 10px 28px rgba(43, 49, 69, .14); }
.home-card.parent { border-color: #dbe4ff; } .home-card.parent:hover { border-color: var(--primary); }
.home-card.child { border-color: #ffe8bd; } .home-card.child:hover { border-color: var(--gold); }
.home-emoji { font-size: 56px; }
.home-avatar { width: 84px; height: 84px; border-radius: 50%; }
.home-card strong { font-size: 22px; }
.home-card small { color: var(--muted); }

/* =====================================================
   孩子端 · 冒险岛主题（男孩向：天空蓝 × 活力橙）
   ===================================================== */
.theme-child {
  background:
    radial-gradient(circle at 85% 12%, rgba(255, 214, 90, .5) 0 60px, transparent 61px),
    linear-gradient(175deg, #7cc4ff 0%, #a8dcff 34%, #d0f4ff 62%, #c9f7df 100%);
  background-attachment: fixed;
}

/* 天空装饰 */
.sky-deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sky-deco span { position: absolute; font-size: 44px; opacity: .55; animation: floaty 7s ease-in-out infinite; }
.sky-deco .d1 { top: 9%; left: 6%; animation-delay: 0s; }
.sky-deco .d2 { top: 16%; right: 10%; font-size: 30px; animation-delay: 1.2s; }
.sky-deco .d3 { top: 46%; left: 3%; font-size: 36px; animation-delay: 2s; }
.sky-deco .d4 { bottom: 12%; right: 5%; font-size: 40px; animation-delay: .8s; opacity: .45; }
.sky-deco .d5 { bottom: 24%; left: 12%; font-size: 30px; animation-delay: 2.8s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-14px) rotate(4deg); }
}
.theme-child .wrap, .theme-child .flash-wrap { position: relative; z-index: 1; }

/* 顶栏：圆角胶囊浮岛 */
.kid-header {
  position: sticky; top: 8px; z-index: 20;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 8px auto 0; width: min(880px, 94vw);
  padding: 8px 14px;
  background: rgba(255, 255, 255, .95); border-radius: 22px;
  box-shadow: 0 6px 0 rgba(38, 99, 158, .18), 0 10px 24px rgba(38, 99, 158, .16);
}
.kid-me { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 17px; }
.kid-me img { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #ffb03a; background: #fff; }
.kid-nav { display: flex; gap: 6px; flex: 1; justify-content: center; flex-wrap: wrap; }
.kid-nav a {
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
  font-size: 25px; padding: 6px 18px; border-radius: 16px; transition: all .15s;
  border: 3px solid transparent;
}
.kid-nav a small { font-size: 12px; font-weight: bold; color: var(--muted); }
.kid-nav a.on {
  background: #fff; border-color: #ff9d2e; transform: translateY(-3px);
  box-shadow: 0 5px 0 rgba(255, 157, 46, .35);
}
.kid-nav a.on small { color: #e07b00; }
.kid-points {
  font-weight: 900; font-size: 18px; white-space: nowrap;
  background: linear-gradient(135deg, #ffd54f, #ffb300);
  border-radius: 999px; padding: 7px 16px; color: #6b4300;
  box-shadow: 0 4px 0 rgba(184, 134, 11, .35);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}

/* 中屏以下：导航独占一行四等分，顶栏整体收紧 */
@media (max-width: 820px) {
  .kid-header { gap: 6px; padding: 7px 12px; border-radius: 18px; }
  .kid-me { font-size: 15px; }
  .kid-me img { width: 36px; height: 36px; border-width: 2px; }
  .kid-points { order: 2; font-size: 14px; padding: 5px 12px; }
  .kid-nav {
    order: 3; flex-basis: 100%; flex: none; width: 100%;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px;
  }
  .kid-nav a { font-size: 21px; padding: 4px 0 5px; border-radius: 12px; }
  .kid-nav a small { font-size: 11px; }
  .kid-nav a.on { transform: none; box-shadow: 0 3px 0 rgba(255, 157, 46, .35); }
  .kid-hero { margin-top: 12px; padding: 11px 16px; border-radius: 16px; }
  .hero-hi { font-size: 17px; }
  .hero-sub { font-size: 12px; }
  .sky-deco span { font-size: 32px; opacity: .4; }
}

/* 打招呼横幅 */
.kid-hero {
  margin-top: 16px; padding: 14px 20px; border-radius: 20px;
  background: linear-gradient(135deg, #ff8a3c, #ffb03a);
  color: #fff; box-shadow: 0 6px 0 rgba(200, 105, 20, .3);
  display: flex; flex-direction: column;
}
.hero-hi { font-size: 21px; font-weight: 900; text-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.hero-sub { font-size: 13px; opacity: .95; }

/* 任务卡片网格 */
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; margin-top: 16px; }
.tcard {
  position: relative; display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 8px;
  background: #fff; border-radius: 24px; padding: 24px 16px 18px;
  border: 4px solid #eaf2ff;
  box-shadow: 0 8px 0 rgba(56, 116, 178, .16);
  transition: transform .16s, box-shadow .16s;
  overflow: visible;
}
.tcard:hover { transform: translateY(-5px) rotate(-.5deg); box-shadow: 0 13px 0 rgba(56, 116, 178, .2); }
/* 整卡状态配色：待完成白底蓝边 / 待审核浅蓝 / 已完成绿底绿边 / 被打回红底红边 / 过期灰化 */
.tcard.st-submitted { border-color: #9fc3ff; background: linear-gradient(180deg, #f3f8ff, #e8f1ff); box-shadow: 0 8px 0 rgba(53, 96, 216, .18); }
.tcard.st-approved {
  border-color: #6fcf97;
  background: linear-gradient(180deg, #f0fbf4, #d9f5e5);
  box-shadow: 0 8px 0 rgba(47, 163, 107, .28);
}
.tcard.st-rejected { border-color: #f1a6a6; background: linear-gradient(180deg, #fff6f6, #ffe9e9); box-shadow: 0 8px 0 rgba(224, 82, 82, .2); }
.tcard.st-expired { opacity: .55; filter: grayscale(.7); }
/* 已完成：右上角斜角标 + 图标对勾徽章 */
.done-ribbon {
  position: absolute; top: 16px; right: -10px; z-index: 3;
  background: linear-gradient(135deg, #2fa36b, #218356); color: #fff;
  font-size: 13px; font-weight: 900; letter-spacing: 1px;
  padding: 4px 16px 4px 14px; border-radius: 10px 0 0 10px;
  box-shadow: 0 3px 0 rgba(23, 88, 58, .35);
  transform: rotate(4deg);
}
.tcard-iconwrap { position: relative; display: inline-block; }
.tcard-icon {
  width: 96px; height: 96px; border-radius: 26px;
  filter: drop-shadow(0 6px 8px rgba(56, 116, 178, .28));
  animation: bobble 3.4s ease-in-out infinite;
}
@keyframes bobble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.tcard.st-approved .tcard-icon { animation: none; filter: drop-shadow(0 4px 6px rgba(47, 163, 107, .3)); }
.done-check {
  position: absolute; right: -8px; bottom: -6px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%;
  background: #2fa36b; border: 3px solid #fff; color: #fff;
  font-size: 19px; font-weight: 900; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 3px 8px rgba(23, 88, 58, .35);
}
.tcard-title { margin: 0; font-size: 19px; font-weight: 900; }
.tcard-desc { margin: 0; font-size: 13px; color: var(--muted); }
.tcard-meta { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.pts-pill {
  background: linear-gradient(135deg, #ffd54f, #ffb300); color: #6b4300;
  font-weight: 900; font-size: 15px; border-radius: 999px; padding: 3px 13px;
  box-shadow: 0 3px 0 rgba(184, 134, 11, .3);
}
.chip {
  display: inline-block; font-size: 12px; font-weight: bold; padding: 4px 11px; border-radius: 999px;
  background: #f0f1f6; color: var(--muted);
}
.chip-done { background: #e3f6ec; color: #1c7a4c; }
.chip-wait { background: #fff3d6; color: #a97b00; animation: blink 1.8s infinite; }
.chip-info { background: #e3edff; color: #3560d8; animation: blink 1.8s infinite; }
.chip-warn { background: #fdeaea; color: #b23a3a; }
.chip-muted { background: #f0f1f6; color: var(--muted); }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }
.tcard-due { margin: 0; font-size: 12px; color: var(--muted); }
.reject-note {
  background: #fdeaea; border-radius: 12px; padding: 8px 12px;
  font-size: 13px; color: #b23a3a; margin: 0;
}

.submit-box { margin-top: 4px; width: 100%; }
.submit-box summary { list-style: none; display: block; cursor: pointer; }
.submit-box summary::-webkit-details-marker { display: none; }
.btn-go {
  display: block; text-align: center; width: 100%;
  background: linear-gradient(160deg, #ffa03a, #ff7d29); color: #fff; border: none;
  font-size: 18px; font-weight: 900; padding: 13px 20px; border-radius: 999px;
  box-shadow: 0 6px 0 rgba(206, 96, 20, .45);
  letter-spacing: 2px; text-shadow: 0 2px 0 rgba(0, 0, 0, .15);
  transition: transform .12s, box-shadow .12s;
}
.btn-go:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(206, 96, 20, .45); color: #fff; }
.btn-go:active, details[open] > summary.btn-go { transform: translateY(3px); box-shadow: 0 2px 0 rgba(206, 96, 20, .45); }
.submit-form {
  margin-top: 12px; display: flex; flex-direction: column; gap: 10px;
  background: #fffaf0; border: 2px dashed #ffd8a8; padding: 12px; border-radius: 16px;
}
.photo-label { margin: 0; font-size: 13px; font-weight: bold; color: #c26a12; }
.photo-err { margin: 0; color: #b23a3a; font-weight: 900; font-size: 14px; text-align: center; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-7px); }
  40%, 80% { transform: translateX(7px); }
}
.photo-btn.shake { animation: shake .45s; background: linear-gradient(160deg, #ef5350, #e05252); }

/* 美化后的文件选择按钮（隐藏原生 input） */
.photo-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  background: linear-gradient(160deg, #42a5f5, #1e88e5); color: #fff;
  font-size: 16px; font-weight: 900; padding: 12px 16px; border-radius: 14px;
  box-shadow: 0 5px 0 rgba(21, 89, 144, .4); cursor: pointer;
  transition: transform .12s, box-shadow .12s; letter-spacing: 1px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .12);
}
.photo-btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 rgba(21, 89, 144, .4); }
.photo-btn:active { transform: translateY(3px); box-shadow: 0 2px 0 rgba(21, 89, 144, .4); }
.photo-btn input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.photo-btn.parent { display: inline-flex; width: auto; padding: 8px 18px; font-size: 14px; border-radius: 10px; }
.photo-preview {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 2px solid #bfe8d1; border-radius: 12px; padding: 8px;
}
.photo-preview img {
  width: 64px; height: 64px; object-fit: cover; border-radius: 8px; display: none;
  border: 1px solid var(--line);
}
.photo-preview.has-img img { display: block; }
.photo-preview .photo-name { font-size: 13px; color: var(--ok); font-weight: bold; word-break: break-all; flex: 1; text-align: left; }
.photo-preview { flex-wrap: wrap; }
.photo-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.photo-thumbs .thumb { position: relative; }
.photo-thumbs .thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.thumb-x {
  position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 50%;
  border: none; background: var(--bad); color: #fff; font-size: 11px; line-height: 1; cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.photo-clear {
  flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--bad);
  font-size: 13px; font-weight: bold; padding: 5px 12px; border-radius: 999px; cursor: pointer;
}
.photo-clear:hover { border-color: var(--bad); background: #fdeaea; }
img.zoomable { cursor: zoom-in; }

/* 编辑任务：现有照片网格 */
.cur-imgs { display: flex; gap: 12px; flex-wrap: wrap; }
.cur-img-item { text-align: center; }
.cur-img-item img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.del-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 4px; cursor: pointer; }
.cur-img img { max-width: 200px; border-radius: 10px; border: 1px solid var(--line); display: block; margin-bottom: 6px; }

/* 孩子卡片多图：层叠扑克牌效果 + 数量角标 */
.tcard-iconwrap.multi .tcard-icon { position: relative; z-index: 2; }
.tcard-iconwrap.multi::before, .tcard-iconwrap.multi::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 96px; height: 96px; border-radius: 26px; background: #fff;
  border: 3px solid #d8e6f6; z-index: 0;
}
.tcard-iconwrap.multi::before { transform: translate(-50%, -50%) rotate(7deg) translate(7px, 5px); }
.tcard-iconwrap.multi::after { transform: translate(-50%, -50%) rotate(-6deg) translate(-7px, 6px); }
.stack-badge {
  position: absolute; left: -10px; top: -10px; z-index: 3;
  background: linear-gradient(135deg, #42a5f5, #1e88e5); color: #fff;
  font-size: 12px; font-weight: 900; padding: 3px 10px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(30, 90, 150, .3); white-space: nowrap;
}

/* 灯箱多图翻页 */
.lb-prev, .lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .2); color: #fff; font-size: 30px; line-height: 1;
  cursor: pointer; z-index: 2; transition: background .15s;
}
.lb-prev { left: 14px; }
.lb-next { right: 14px; }
.lb-prev:hover, .lb-next:hover { background: rgba(255, 255, 255, .38); }
.lb-count {
  position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; font-weight: bold; background: rgba(0, 0, 0, .45);
  padding: 4px 16px; border-radius: 999px; font-size: 14px;
}

/* 积分页 */
.balance-hero {
  background: linear-gradient(135deg, #ffc65c, #ff9d2e);
  color: #fff; text-align: center; border-radius: 24px; padding: 34px 16px;
  margin-top: 16px; box-shadow: 0 8px 0 rgba(200, 105, 20, .28);
}
.balance-num { font-size: 54px; font-weight: 900; text-shadow: 0 3px 0 rgba(0, 0, 0, .12); }
.balance-label { opacity: .95; font-weight: bold; }
.txn-list { list-style: none; margin: 0; padding: 0; }
.txn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: #fff; border-radius: 16px; padding: 12px 16px; margin-top: 10px;
  box-shadow: 0 5px 0 rgba(56, 116, 178, .12);
}
.txn-reason small { display: block; color: var(--muted); font-size: 12px; }
.txn-amt { font-weight: 900; font-size: 18px; white-space: nowrap; }
.txn.plus .txn-amt { color: var(--ok); }
.txn.minus .txn-amt { color: var(--bad); }

/* 商城 */
.reward-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 16px; }
.reward-card {
  background: #fff; border-radius: 20px; padding: 16px;
  display: flex; flex-direction: column; gap: 6px; text-align: center;
  border: 4px solid #fff1d6; box-shadow: 0 7px 0 rgba(200, 140, 30, .16);
  transition: transform .15s;
}
.reward-card:hover { transform: translateY(-4px); }
.reward-name { font-weight: 900; font-size: 16px; }
.reward-desc { color: var(--muted); font-size: 13px; margin: 0; flex: 1; }
.reward-cost { font-size: 20px; font-weight: 900; color: #e07b00; }
.reward-stock { font-size: 12px; color: var(--muted); }
.btn-buy {
  background: linear-gradient(135deg, #ff5f9e, #ff8754); color: #fff; border: none;
  font-weight: 900; border-radius: 999px; padding: 9px 18px;
  box-shadow: 0 4px 0 rgba(214, 70, 120, .4);
}

.voucher-list { list-style: none; margin: 0; padding: 0; }
.voucher {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: #fff; border-radius: 16px; padding: 14px 16px; margin-top: 10px;
  box-shadow: 0 5px 0 rgba(56, 116, 178, .12);
}
.voucher.v-pending { border: 3px dashed #ffb300; }
.voucher.v-fulfilled { opacity: .75; }
.voucher.v-cancelled { opacity: .55; }
.voucher-name { font-weight: 900; }
.voucher-code {
  font-family: ui-monospace, Consolas, monospace; font-size: 22px; font-weight: 800;
  letter-spacing: 2px; color: #c26a12; margin: 4px 0;
}
.voucher-side { text-align: center; }
.voucher-side .hint { font-size: 12px; color: var(--muted); margin: 0 0 8px; }

/* 成就 */
.streak-hero {
  display: flex; align-items: center; gap: 16px;
  background: linear-gradient(135deg, #ff7043, #ff9d2e); color: #fff;
  border-radius: 24px; padding: 22px 20px; margin-top: 16px;
  box-shadow: 0 8px 0 rgba(200, 80, 20, .28);
}
.flame { font-size: 48px; animation: flamebeat 1.6s ease-in-out infinite; display: inline-block; }
@keyframes flamebeat {
  0%, 100% { transform: scale(1) rotate(-3deg); }
  50% { transform: scale(1.15) rotate(4deg); }
}
.streak-num { font-size: 24px; font-weight: 900; }
.streak-label { opacity: .95; font-size: 13px; }
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.badge-card {
  background: #fff; border-radius: 18px; padding: 18px 10px; text-align: center;
  display: flex; flex-direction: column; gap: 4px;
  border: 3px solid #ffe8bd; box-shadow: 0 6px 0 rgba(200, 140, 30, .16);
}
.badge-icon { font-size: 42px; }
.badge-card small { color: var(--muted); font-size: 12px; }
.badge-date { font-size: 12px; color: var(--warn); font-weight: bold; }
.badge-card.locked { filter: grayscale(.9); opacity: .68; border-color: #eef0f5; }
.sec-title { margin-top: 28px; }

/* 孩子端提示改为悬浮 toast，滚动到任何位置都能看到 */
.theme-child .flash-wrap {
  position: fixed; top: 10px; left: 50%; transform: translateX(-50%);
  width: min(92vw, 430px); margin: 0; z-index: 100;
}
.theme-child .flash {
  border-radius: 16px; font-weight: bold; text-align: center;
  box-shadow: 0 8px 22px rgba(20, 60, 100, .25);
}

/* 富文本提醒编辑器（家长设置页） */
.rt-toolbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.rt-btn {
  padding: 5px 10px; min-width: 34px; border: 1px solid var(--line);
  background: #fff; border-radius: 8px; cursor: pointer; font-size: 14px;
}
.rt-btn:hover { border-color: var(--primary); color: var(--primary); }
.rt-sep { width: 1px; height: 22px; background: var(--line); display: inline-block; margin: 0 4px; }
.rt-color {
  width: 24px; height: 24px; border-radius: 50%; cursor: pointer; padding: 0;
  border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); transition: transform .12s;
}
.rt-color:hover { transform: scale(1.18); }
.rt-size { padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.rt-editor {
  min-height: 110px; max-height: 260px; overflow-y: auto;
  border: 2px solid var(--line); border-radius: 12px; padding: 12px;
  background: #fff; font-size: 15px; line-height: 1.7; outline: none;
}
.rt-editor:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(91, 124, 250, .15); }
.rt-editor:empty::before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
#rt-emoji-panel {
  display: flex; gap: 6px; flex-wrap: wrap;
  background: #fff8e1; border: 1px solid #ffe08a; border-radius: 12px; padding: 10px; margin-top: 8px;
}
.emoji-item { font-size: 22px; border: none; background: none; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.emoji-item:hover { background: #ffe08a; }
.notice-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.notice-actions .btn { flex: 1; }

/* 孩子端：家长提醒横幅（区别于橙色加油横幅） */
.notice-hero {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 16px; padding: 14px 18px; border-radius: 20px;
  background: linear-gradient(135deg, #ff4d6d, #c9186b);
  color: #fff; box-shadow: 0 6px 0 rgba(160, 16, 80, .3);
}
.notice-hero::before {
  content: "📣 家长提醒"; font-weight: 900; font-size: 13px; letter-spacing: 2px; opacity: .92;
}
.notice-hero .rt-content { font-size: 17px; font-weight: bold; line-height: 1.65; overflow-wrap: anywhere; }
.notice-hero .rt-content :is(b, strong) { color: #ffe082; }

/* ===== 家长端 ===== */
.admin-topbar {
  display: flex; align-items: center; gap: 16px; padding: 0 18px;
  background: #23283d; color: #fff; flex-wrap: wrap; position: sticky; top: 0; z-index: 20;
}
.admin-topbar .brand { font-weight: bold; padding: 14px 0; }
.admin-topbar nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }
.admin-topbar nav a { padding: 16px 12px; color: #aab1c9; font-size: 14px; }
.admin-topbar nav a.on { color: #fff; box-shadow: inset 0 -3px 0 var(--gold); }
.admin-topbar .dot {
  background: var(--bad); color: #fff; border-radius: 999px;
  font-size: 12px; padding: 1px 7px;
}
.admin-topbar .exit { color: #aab1c9; font-size: 14px; }
.admin-topbar .exit:hover { color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: flex; flex-direction: column; gap: 2px;
  border-top: 4px solid var(--line);
}
.stat-card strong { font-size: 26px; }
.stat-card span { color: var(--muted); font-size: 13px; }
.stat-card.warn { border-top-color: var(--bad); }
.stat-card.gold { border-top-color: var(--gold); }
.stat-card.blue { border-top-color: var(--primary); }
.stat-card.green { border-top-color: var(--ok); }
.stat-card.pulse { animation: pulse 1.6s infinite; }
@keyframes pulse {
  0%, 100% { transform: none; }
  50% { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(224, 82, 82, .25); }
}
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.quick-grid .btn { padding: 16px; font-size: 15px; }

.table { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); font-size: 14px; }
.table th { text-align: left; background: #f7f8fc; color: var(--muted); font-weight: normal; padding: 10px 12px; font-size: 13px; }
.table td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
.table td.ops { display: flex; gap: 6px; flex-wrap: wrap; }
.table td.ops form { margin: 0; }
.group-title { margin-top: 30px; color: var(--muted); font-weight: normal; }
.narrow-table { width: auto; min-width: 320px; }
.kv-table td:first-child { color: var(--muted); }

.review-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-top: 14px;
}
.review-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.review-head strong { font-size: 17px; }
.review-head .pts { color: var(--warn); font-weight: bold; }
.kid-note { background: #f4f6fb; border-radius: 10px; padding: 8px 12px; font-size: 14px; }
.proof-img { max-width: 220px; max-height: 220px; border-radius: 12px; border: 1px solid var(--line); margin-top: 8px; object-fit: cover; cursor: zoom-in; transition: transform .15s; }
.proof-img:hover { transform: scale(1.03); }
/* 图片放大遮罩 */
.img-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(15, 20, 35, .82);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out; padding: 3vmin;
}
.img-overlay img {
  max-width: 94vw; max-height: 94vh;
  border-radius: 10px; box-shadow: 0 12px 48px rgba(0, 0, 0, .5);
  background: #fff;
}
.review-ops { display: flex; gap: 12px; margin-top: 12px; flex-wrap: wrap; align-items: flex-start; }
.reject-box summary { list-style: none; }
.reject-box summary::-webkit-details-marker { display: none; }
.reject-form { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; }
.reject-form input { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; min-width: 220px; }

.chart {
  display: flex; align-items: flex-end; gap: 3px; height: 190px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 12px 8px; overflow-x: auto;
}
.bar-col { flex: 1; min-width: 18px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.bar { width: 100%; max-width: 26px; background: linear-gradient(180deg, #7d97ff, #5b7cfa); border-radius: 5px 5px 0 0; min-height: 4px; }
.bar-val { font-size: 11px; color: var(--primary-dark); font-weight: bold; min-height: 14px; }
.bar-label { font-size: 10px; color: var(--muted); white-space: nowrap; }

.empty {
  background: rgba(255, 255, 255, .92); border: 3px dashed #cfe3f5; color: var(--muted);
  text-align: center; border-radius: var(--radius); padding: 34px 16px; margin-top: 14px;
  font-size: 15px;
}
.img-link { font-size: 13px; color: var(--primary); }

@media (max-width: 640px) {
  .kid-nav { order: 3; }
  .admin-topbar nav a { padding: 12px 8px; }
  .chart { height: 150px; }
  .task-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .tcard { padding: 24px 10px 14px; }
  .tcard-icon { width: 76px; height: 76px; }
  .tcard-iconwrap.multi::before, .tcard-iconwrap.multi::after { width: 76px; height: 76px; }
  .tcard-title { font-size: 16px; }
}
@media (max-width: 400px) {
  .task-grid { grid-template-columns: 1fr; }
}
