/* 神兽打卡岛 —— 移动优先，暖色活泼但不幼稚 */
:root {
  --ink: #2f2739;
  --ink2: #6d6480;
  --ink3: #9a93aa;
  --line: rgba(47, 39, 57, .08);
  --card: #ffffff;
  --bg: #fbf8f5;
  --brand: #ff8a4c;
  --brand2: #ffb37a;
  --brand-soft: #fff0e4;
  --violet: #7c5cff;
  --violet-soft: #efeaff;
  --ok: #2fae74;
  --ok-soft: #e6f7ee;
  --warn: #e8a33d;
  --danger: #e4573d;
  --r: 18px;
  --shadow: 0 6px 24px rgba(93, 63, 122, .09);
  --shadow-lg: 0 18px 48px rgba(93, 63, 122, .18);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  overscroll-behavior-y: none;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--violet); text-decoration: none; }
img, svg { display: block; }

.hide { display: none !important; }

/* ============ 容器 ============ */
#app { min-height: 100%; }

.shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 0 16px 104px;
  min-height: 100vh;
}
.shell.wide { max-width: 880px; }

/* ============ 顶栏 ============ */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0 10px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: linear-gradient(180deg, var(--bg) 70%, rgba(251, 248, 245, 0));
}
.topbar h1 {
  font-size: 17px;
  margin: 0;
  font-weight: 700;
  letter-spacing: .2px;
  flex: 1;
}
.topbar .sub { font-size: 12px; color: var(--ink3); font-weight: 400; }
.icon-btn {
  width: 36px; height: 36px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 16px;
}
.icon-btn:active { transform: scale(.94); }

/* 孩子端退出锁：按住 1.2 秒，环走满即弹确认 */
.lock-btn {
  position: relative;
  width: 42px; height: 42px; flex: none;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card);
  box-shadow: var(--shadow);
  font-size: 17px;
  border: 0; padding: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
.lock-btn .lock-ic { position: relative; z-index: 1; line-height: 1; }
.lock-btn.holding .lock-ic { transform: scale(.88); }
.lock-prog {
  position: absolute; inset: 0; width: 100%; height: 100%;
  transform: rotate(-90deg); pointer-events: none;
}
.lock-prog circle {
  fill: none;
  stroke: var(--brand);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 106.8;
  stroke-dashoffset: 106.8;
}
.lock-btn.holding .lock-prog circle {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.2s linear;
}
.lock-btn.holding { transform: none; }

/* ============ 卡片 ============ */
.card {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
}
.card.tight { padding: 12px; }
.card-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink2);
  letter-spacing: .4px;
  margin: 0 0 10px;
  display: flex; align-items: center; gap: 6px;
}
.card-title .tag {
  margin-left: auto;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink3);
}

/* ============ 登录 ============ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 22px 40px;
  background:
    radial-gradient(120% 60% at 50% 0%, #ffe6d2 0%, rgba(255, 230, 210, 0) 60%),
    radial-gradient(100% 50% at 80% 100%, #e8e2ff 0%, rgba(232, 226, 255, 0) 60%),
    var(--bg);
}
.login-hero { text-align: center; margin-bottom: 26px; }
.login-hero .art { width: 190px; height: 190px; margin: 0 auto -6px; }
.login-hero h1 {
  font-size: 25px; margin: 0 0 6px; letter-spacing: 1px; font-weight: 800;
}
.login-hero p { margin: 0; color: var(--ink2); font-size: 13.5px; }

.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: 12.5px; color: var(--ink2);
  margin-bottom: 6px; font-weight: 600;
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1.5px solid var(--line);
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 138, 76, .14);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 13px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 15px;
  background: var(--brand);
  color: #fff;
  transition: transform .12s, opacity .15s;
  box-shadow: 0 8px 20px rgba(255, 138, 76, .3);
}
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost {
  background: #fff; color: var(--ink);
  box-shadow: var(--shadow);
}
.btn.soft { background: var(--brand-soft); color: #c96a2f; box-shadow: none; }
.btn.violet { background: var(--violet); box-shadow: 0 8px 20px rgba(124, 92, 255, .28); }
.btn.danger { background: #fff; color: var(--danger); box-shadow: var(--shadow); }
.btn.sm { padding: 8px 13px; font-size: 13px; border-radius: 11px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ============ 神兽展示区 ============ */
.beast-hero {
  position: relative;
  border-radius: 24px;
  padding: 6px 0 14px;
  background:
    radial-gradient(90% 70% at 50% 8%, #fff2e3 0%, rgba(255, 242, 227, 0) 70%),
    linear-gradient(180deg, #fffdfb 0%, #fff 100%);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 12px;
}
.beast-stage {
  width: 100%;
  height: 216px;
  display: grid;
  place-items: center;
  touch-action: manipulation;
}
.beast-stage svg { width: 210px; height: 210px; }
.beast-stage .bi-art { width: 210px; height: 210px; }
.beast-stage:active svg, .beast-stage:active .bi-art { transform: scale(1.03); }
.beast-meta { text-align: center; padding: 0 18px; }
.beast-name {
  font-size: 19px; font-weight: 800; letter-spacing: .5px;
}
.beast-name small {
  font-size: 12px; font-weight: 600; color: var(--ink3);
  margin-left: 6px; letter-spacing: 0;
}
.beast-desc {
  font-size: 12.5px; color: var(--ink2); margin: 2px 0 10px;
  min-height: 18px;
}
.expbar {
  height: 12px; border-radius: 99px; background: #f0ebf6;
  overflow: hidden; position: relative;
}
.expbar > i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--brand), var(--brand2));
  transition: width .6s cubic-bezier(.3, 1.3, .5, 1);
}
.exp-text {
  display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--ink3); margin-top: 5px;
}

.wallet {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 12px;
}
.coin-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(135deg, #fff3d6, #ffe4ae);
  border: 1.5px solid #f5cf87;
  color: #8a5c05;
  padding: 5px 13px;
  border-radius: 99px;
  font-weight: 800;
  font-size: 14px;
}
.streak-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #ffeee7; color: #c9502c;
  padding: 5px 12px; border-radius: 99px;
  font-weight: 700; font-size: 13px;
}

/* ============ 任务 ============ */
.task {
  display: flex; align-items: center; gap: 12px;
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  transition: transform .14s, opacity .2s;
  position: relative;
  overflow: hidden;
}
.task:active { transform: scale(.985); }
.task .tick {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%;
  border: 2.5px solid #e6dff0;
  display: grid; place-items: center;
  font-size: 16px; color: transparent;
  transition: all .18s;
}
.task .body { flex: 1; min-width: 0; }
.task .t {
  font-weight: 700; font-size: 15.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task .m { font-size: 12px; color: var(--ink3); margin-top: 2px; display: flex; gap: 8px; }
.task .reward {
  flex: none; font-size: 12.5px; font-weight: 800; color: #b07c14;
  background: #fff6e0; padding: 4px 9px; border-radius: 9px;
}
.task.done {
  background: var(--ok-soft);
  box-shadow: none;
}
.task.done .tick {
  background: var(--ok); border-color: var(--ok); color: #fff;
}
.task.done .t {
  color: var(--ink3);
  text-decoration: line-through;
  text-decoration-color: rgba(154, 147, 170, .6);
}
.task.done .reward { color: #2f9e6b; background: #d9f2e5; }

/* 任务分组：同一科目的几小项，合起来看成一份「英语作业」 */
.tg {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 13px 13px 5px;
  margin-bottom: 12px;
}
.tg-head { display: flex; align-items: baseline; gap: 8px; padding: 0 2px 8px; }
.tg-name { font-weight: 800; font-size: 15.5px; color: var(--violet); }
.tg-prog { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink3); }
.tg-bar {
  height: 7px; border-radius: 4px; background: #e9e1f8;
  overflow: hidden; margin: 0 2px 11px;
}
.tg-bar i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--violet), var(--brand2));
  transition: width .35s ease;
}
.tg .task {
  background: #faf8ff;
  box-shadow: none;
  border-radius: 12px;
  margin-bottom: 8px;
  padding: 11px 12px;
}
.tg .task .t { font-size: 14.5px; white-space: normal; line-height: 1.4; }
.tg .task .tick { width: 30px; height: 30px; font-size: 14px; }
.tg .task.done { background: var(--ok-soft); }
.tg.done .tg-name { color: var(--ink3); }
.tg.done .tg-prog { color: var(--ok); }
.tg.done .tg-bar i { background: var(--ok); }

.empty {
  text-align: center; color: var(--ink3); font-size: 13.5px;
  padding: 34px 10px;
}
.empty .em { font-size: 34px; display: block; margin-bottom: 8px; opacity: .8; }

/* ============ 底部导航 ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 40;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar .inner {
  max-width: 520px; margin: 0 auto;
  display: flex; gap: 4px;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 0; border-radius: 12px;
  font-size: 11px; color: var(--ink3); font-weight: 600;
  transition: color .15s, background .15s;
}
.tab .ti { font-size: 19px; line-height: 1; }
.tab.on { color: var(--brand); background: var(--brand-soft); }
.tab.on.violet { color: var(--violet); background: var(--violet-soft); }

/* ============ 弹窗 ============ */
.mask {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(38, 28, 52, .48);
  backdrop-filter: blur(3px);
  display: grid; place-items: center;
  padding: 22px;
  animation: fadeIn .18s ease;
}
.modal {
  width: 100%; max-width: 380px;
  background: #fff; border-radius: 24px;
  padding: 22px 20px 18px;
  box-shadow: var(--shadow-lg);
  animation: popIn .3s cubic-bezier(.2, 1.4, .5, 1);
  max-height: 84vh; overflow: auto;
}
.modal h2 { margin: 0 0 4px; font-size: 19px; text-align: center; }
.modal .lead { text-align: center; color: var(--ink2); font-size: 13px; margin: 0 0 16px; }
/* 操作条吸在弹窗底部：内容再长，「布置/取消」也始终点得到 */
.modal .acts {
  display: flex; gap: 9px; margin-top: 16px;
  position: sticky; bottom: 0; z-index: 2;
  background: #fff;
  padding: 10px 0 4px;
  box-shadow: 0 -10px 14px -10px rgba(60, 40, 80, .22);
}
.modal .acts .btn { flex: 1; }
/* 退出要家长密码：错误提示放在输入框下面，别用 toast —— 弹窗操作条是 sticky 吸底的，会被压住 */
.pw-err {
  font-size: 12.5px; color: var(--danger); line-height: 1.5;
  margin: -2px 0 2px; padding-left: 2px;
}

/* 粘贴识别区 */
.paste-box {
  border: 1.5px dashed #ffd0b0; background: #fffaf3;
  border-radius: 16px; padding: 12px; margin-top: 12px;
}
.paste-box .paste-tip {
  font-size: 12px; color: #a4753a; font-weight: 700; margin-bottom: 7px;
}
.paste-box textarea {
  width: 100%; box-sizing: border-box;
  padding: 11px 12px; border-radius: 13px;
  border: 1.5px solid #ffd9bd; background: #fff;
  font-size: 13.5px; line-height: 1.6; outline: none;
  transition: border-color .15s, box-shadow .15s;
  resize: vertical;
}
.paste-box textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 138, 76, .14);
}
/* 识别完成后折叠：只留一行提示，点一下能重新展开 */
.paste-box.collapsed { padding: 10px 12px; cursor: pointer; }
.paste-box.collapsed textarea,
.paste-box.collapsed .btn { display: none; }
.paste-box.collapsed .paste-tip { margin-bottom: 0; }
.paste-box.collapsed .paste-tip::after {
  content: '（已识别 · 点此重贴）';
  font-weight: 500; color: var(--ink3);
}
.parse-info { font-size: 12px; line-height: 1.55; margin: 10px 2px 0; }
.parse-info:empty { display: none; }
.parse-info.good { color: #22935f; }
.parse-info.bad { color: #d9534f; }
.parse-info + .field { margin-top: 12px; }

/* 弹窗里被折叠的次要设置 */
.modal details.more { margin-top: 12px; }
.modal details.more > summary {
  font-size: 12.5px; color: var(--ink3); cursor: pointer;
  padding: 6px 2px; list-style: none; outline: none;
}
.modal details.more > summary::-webkit-details-marker { display: none; }
.modal details.more > summary::before { content: '＋ '; color: var(--brand); font-weight: 700; }
.modal details.more[open] > summary::before { content: '－ '; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn {
  from { opacity: 0; transform: scale(.86) translateY(10px) }
  to { opacity: 1; transform: none }
}

/* 宝箱 */
.chest-stage { text-align: center; padding: 6px 0 2px; }
.chest-emoji {
  font-size: 68px; line-height: 1;
  animation: chestShake .7s ease-in-out infinite;
  display: inline-block;
}
@keyframes chestShake {
  0%, 100% { transform: rotate(-6deg) scale(1) }
  50% { transform: rotate(6deg) scale(1.07) }
}
.chest-open .chest-emoji { animation: chestBurst .6s cubic-bezier(.2, 1.6, .5, 1) forwards; }
@keyframes chestBurst {
  0% { transform: scale(1) rotate(0) }
  40% { transform: scale(1.5) rotate(-8deg) }
  100% { transform: scale(0) rotate(20deg); opacity: 0 }
}
.gain-coins {
  font-size: 34px; font-weight: 900; letter-spacing: -1px;
  color: #b07c14;
  animation: gainPop .5s cubic-bezier(.2, 1.6, .5, 1);
}
@keyframes gainPop { from { transform: scale(.4); opacity: 0 } to { transform: none; opacity: 1 } }
.rarity-rare .gain-coins { color: #a86bc4; }
.badge-unlock {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, #fff8e6, #fff);
  border: 1.5px solid #f5dfa8;
  border-radius: 14px; padding: 10px 12px; margin-top: 10px;
  animation: gainPop .5s cubic-bezier(.2, 1.6, .5, 1);
}
.badge-unlock .bi { font-size: 26px; }
.badge-unlock .bn { font-weight: 800; font-size: 14px; }
.badge-unlock .bd { font-size: 12px; color: var(--ink2); }

/* 进化 */
.evolve-stage { display: grid; place-items: center; height: 200px; position: relative; }
.evolve-stage svg { width: 190px; height: 190px; animation: evolveGlow 1.2s ease-in-out infinite alternate; }
.evolve-stage .bi-art { width: 190px; height: 190px; animation: evolveGlow 1.2s ease-in-out infinite alternate; }
@keyframes evolveGlow {
  from { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 200, 100, 0)) }
  to { transform: scale(1.06); filter: drop-shadow(0 0 22px rgba(255, 196, 96, .85)) }
}
.evolve-rays {
  position: absolute; inset: 0; pointer-events: none;
  background: conic-gradient(from 0deg, rgba(255, 214, 138, .55), transparent 22%, rgba(255, 214, 138, .55) 44%, transparent 66%, rgba(255, 214, 138, .55) 88%, transparent);
  mask: radial-gradient(circle at center, transparent 34%, #000 62%, transparent 82%);
  -webkit-mask: radial-gradient(circle at center, transparent 34%, #000 62%, transparent 82%);
  animation: spin 9s linear infinite;
  opacity: .85;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* ============ 专注计时 ============ */
.timer-ring {
  width: 190px; height: 190px; margin: 0 auto;
  position: relative;
}
.timer-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.timer-ring .ring-bg { fill: none; stroke: #f0ebf6; stroke-width: 12; }
.timer-ring .ring-fg {
  fill: none; stroke: var(--brand); stroke-width: 12; stroke-linecap: round;
  transition: stroke-dashoffset .95s linear;
}
.timer-num {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 38px; font-weight: 800; font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.timer-hint { text-align: center; color: var(--ink2); font-size: 13px; margin: 12px 0 0; }

/* ============ 列表 / 表单 ============ */
.row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .name { font-weight: 700; font-size: 15px; }
.row .meta { font-size: 12px; color: var(--ink3); }
.row .avatar {
  width: 46px; height: 46px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(160deg, #fff4e8, #ffe9f2); flex: none;
}
.pill {
  display: inline-block; font-size: 11.5px; font-weight: 700;
  padding: 3px 9px; border-radius: 99px;
  background: var(--brand-soft); color: #c96a2f;
}
.pill.ok { background: var(--ok-soft); color: #23895b; }
.pill.gray { background: #f1eef8; color: var(--ink2); }
.pill.violet { background: var(--violet-soft); color: var(--violet); }

.seg {
  display: flex; gap: 4px; background: #f1eef8; padding: 4px; border-radius: 13px;
  margin-bottom: 12px;
}
.seg button {
  flex: 1; padding: 8px 6px; border-radius: 10px; font-size: 13px;
  font-weight: 700; color: var(--ink2);
}
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0, 0, 0, .07); }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  padding: 8px 13px; border-radius: 99px; font-size: 13px; font-weight: 700;
  background: #f4f1fa; color: var(--ink2);
  border: 1.5px solid transparent;
}
.chip.on { background: var(--brand-soft); color: #c96a2f; border-color: var(--brand2); }

.beast-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.beast-cell {
  border-radius: 13px; padding: 4px 2px 6px; text-align: center;
  background: #faf8fd; border: 2px solid transparent;
  transition: transform .14s;
}
.beast-cell:active { transform: scale(.96); }
.beast-cell.on { border-color: var(--brand); background: #fff8f2; }
.beast-cell .art { height: 48px; }
.beast-cell .nm { font-size: 11px; font-weight: 700; margin-top: 1px; line-height: 1.3; }
.beast-cell .st { font-size: 9px; color: var(--ink3); line-height: 1.3; }

/* 神兽素材图（山海经图鉴白底正面图）：multiply 让白底融进卡片底色，不出现白方块。
   尺寸按容器上限缩放（不用 width/height:100%，否则方形图会把容器撑高、盖住下面的文字） */
.bi-art {
  display: block; margin: 0 auto;
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  mix-blend-mode: multiply;
  -webkit-user-drag: none; user-select: none;
}
/* 图鉴卡片左上角的编号（对应图鉴 01–20） */
.dex-no {
  font-size: 10.5px; font-weight: 800; color: #fff; background: var(--brand2);
  border-radius: 6px; padding: 1px 5px; letter-spacing: .3px;
  font-variant-numeric: tabular-nums;
}

/* 统计条 */
.bars { display: flex; align-items: flex-end; gap: 5px; height: 96px; padding-top: 8px; }
.bars .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 3px; }
.bars .b i {
  display: block; border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, var(--brand2), var(--brand));
  min-height: 3px;
  transition: height .5s ease;
}
.bars .b i.zero { background: #f0ebf6; }
.bars .x { font-size: 9.5px; color: var(--ink3); text-align: center; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: #fff; border-radius: 15px; padding: 13px;
  box-shadow: var(--shadow);
}
.stat .v { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.stat .k { font-size: 12px; color: var(--ink3); }

/* 长期打卡：一行 = 一条习惯，下面是最近 7 天的小格子 */
.hb {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 13px; border-radius: 16px;
  background: #fff; box-shadow: var(--shadow);
  margin-bottom: 9px;
  transition: transform .14s;
}
.hb:active { transform: scale(.99); }
.hb .hb-main { flex: 1; min-width: 0; cursor: pointer; }
.hb .hb-ic {
  width: 38px; height: 38px; flex: none; border-radius: 12px;
  display: grid; place-items: center; font-size: 19px;
  background: linear-gradient(150deg, #fff3e2, #ffe8ef);
}
.hb .hb-t { font-weight: 700; font-size: 15px; }
.hb .hb-m { font-size: 11.5px; color: var(--ink3); margin-top: 2px; }
.hb .hb-dots { display: flex; gap: 4px; margin-top: 7px; }
.hb .hb-dots i { width: 16px; height: 7px; border-radius: 3.5px; background: #efecf5; }
.hb .hb-dots i.on { background: #35b87c; }
.hb .hb-dots i.miss { background: #f9bda3; }
.hb .hb-dots i.today { background: #fff; box-shadow: inset 0 0 0 1.8px var(--brand); animation: dotPulse 1.4s ease-in-out infinite; }
.hb .hb-dots i.on.today { background: var(--ok); animation: none; }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }
.hb .hb-ok { font-size: 12.5px; font-weight: 700; color: var(--ok); white-space: nowrap; flex: none; }
.hb .hb-idle { font-size: 12px; color: var(--ink3); white-space: nowrap; flex: none; }
.hb.done { background: var(--ok-soft); box-shadow: none; }
.hb.done .hb-t { color: var(--ink3); }
.hb.off { opacity: .6; }

/* 频率选择：每天 / 每周几 / 每隔几天 */
.freq-tabs { display: flex; gap: 7px; }
.freq-tab {
  flex: 1; padding: 9px 0; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink2);
  font-size: 13px; font-weight: 600;
}
.freq-tab.on { border-color: var(--brand); background: var(--brand-soft); color: #c96a2b; }
.wd-row { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.wd {
  width: 34px; height: 34px; border-radius: 11px;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink2);
  font-size: 13px; font-weight: 700;
}
.wd.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip {
  padding: 7px 12px; border-radius: 11px;
  border: 1.5px dashed #f0bfa4; background: #fff8f2;
  color: #c96a2b; font-size: 12.5px; font-weight: 600;
}
.hint { font-size: 11.5px; color: var(--ink3); margin-top: 7px; line-height: 1.6; }
input.tiny {
  width: 64px; padding: 9px 10px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff;
  text-align: center; font-size: 14px; outline: none;
}
input.tiny:focus { border-color: var(--brand); }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 8px;
  pointer-events: none; width: max-content; max-width: 88vw;
}
.toast-item {
  background: rgba(40, 30, 54, .93); color: #fff;
  padding: 10px 17px; border-radius: 13px; font-size: 13.5px; font-weight: 600;
  animation: toastIn .25s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .22);
}
.toast-item.bad { background: rgba(196, 62, 40, .95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }

.spin { animation: spin 1s linear infinite; }

/* 桌面端微调 */
@media (min-width: 700px) {
  .shell { padding-bottom: 40px; }
  .tabbar { position: sticky; bottom: 0; border-radius: 18px 18px 0 0; }
  .beast-stage { height: 240px; }
  .beast-stage svg, .beast-stage .bi-art { width: 232px; height: 232px; }
}
