:root {
  --bg: #f3f0e9; --card: #fffefb; --ink: #22252a; --muted: #8a867d; --line: #e6e0d4;
  --acc: #c9432f; --acc2: #c9432f; --acc-soft: #f7e8e3;
  --blue: #2f5f8a; --blue-soft: #e7eef5; --green: #3f8a5c; --green-soft: #e5f1e8; --gold: #d29a2a;
  --shadow: none; --radius: 12px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); padding-bottom: calc(80px + env(safe-area-inset-bottom));
  font: 15px/1.55 -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  min-height: 100vh;
}
h1, h2, h3 { letter-spacing: 0; }

/* ---------- 顶栏 ---------- */
.top { display: flex; align-items: center; gap: 10px; max-width: 560px; margin: 0 auto; padding: 14px 18px 6px; }
.top .logo { width: 30px; height: 30px; border-radius: 8px; }
.top h1 { font-size: 18px; margin: 0; line-height: 1.2; letter-spacing: 1px; }
#sub { color: var(--muted); font-size: 12px; display: block; }
main { padding: 8px 14px; max-width: 560px; margin: 0 auto; }

/* ---------- 卡片与标题 ---------- */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; margin: 0 0 10px; border: 1px solid var(--line); }
.card h2 { margin: 0 0 8px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.card h3 { font-size: 13px; margin: 16px 0 8px; color: var(--muted); font-weight: 600; }
.card > h3:first-child { margin-top: 0; }
.card.center h2 { justify-content: center; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.center { text-align: center; }
.q { font-size: 16px; margin: 4px 0 10px; font-weight: 600; }
.progress { color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .5px; }
.tasks-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tasks-head h2 { margin: 0; }

/* ---------- 按钮与表单 ---------- */
button { font: inherit; border: 0; border-radius: 8px; padding: 10px 16px; background: #efebe3; color: var(--ink); cursor: pointer; transition: transform .1s, box-shadow .2s, background .2s; }
button:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: default; transform: none; }
button.primary, a.btn { background: var(--acc); color: #fff; }
button.ghost { background: transparent; border: 1px solid #d6cfc2; }
button.small { padding: 6px 12px; font-size: 13px; border-radius: 7px; }
button.big { width: 100%; padding: 13px; font-size: 16px; font-weight: 600; border-radius: 10px; }
button.done { background: var(--green-soft); color: #2f7a48; box-shadow: none; }
a.btn { display: inline-block; text-decoration: none; border-radius: 7px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
input, select { font: inherit; width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); outline: none; transition: border-color .2s, background .2s; }
input:focus, select:focus { border-color: var(--ink); background: #fff; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
label input, label select { margin-top: 5px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
form.inline { display: flex; gap: 8px; margin: 10px 0; }
form.inline input, form.inline select { flex: 1; min-width: 0; }
form.inline button { flex: none; }
.row { display: flex; gap: 8px; justify-content: space-between; margin-top: 14px; flex-wrap: wrap; }
.center-row { justify-content: center; }
details.more { margin: 2px 0 14px; }
details.more summary { color: var(--acc); font-size: 13px; cursor: pointer; margin-bottom: 12px; list-style: none; }
details.more summary::before { content: "＋ "; }
details.more[open] summary::before { content: "－ "; }
.inline-row { display: flex; gap: 10px; align-items: flex-end; }
.inline-row label { flex: 1; }
.inline-row button { margin-bottom: 12px; flex: none; }

/* ---------- 底栏 ---------- */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto;
  display: flex; background: rgba(255, 254, 251, .96); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding: 6px max(6px, calc(50% - 280px)) calc(6px + env(safe-area-inset-bottom)); z-index: 5;
}
.tabs a { flex: 1; text-align: center; padding: 4px 0 2px; color: var(--muted); text-decoration: none; position: relative; font-size: 11px; transition: color .2s; }
.tabs svg { display: block; width: 23px; height: 23px; margin: 0 auto 1px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tabs a.on { color: var(--ink); font-weight: 700; }
.tabs a.on svg { stroke: var(--acc); stroke-width: 2; }
.tabs b { position: absolute; top: 0; left: 56%; background: var(--acc); color: #fff; border-radius: 99px; font-size: 10px; padding: 0 5px; line-height: 15px; min-width: 15px; box-shadow: 0 0 0 2px #fff; }
.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: rgba(34, 37, 42, .94); color: #fff; padding: 9px 16px; border-radius: 8px; font-size: 14px; max-width: 88%; z-index: 9; animation: toastIn .2s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
#app { transition: opacity .15s; }
#app.loading { opacity: .5; pointer-events: none; }
#app > section { animation: rise .25s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 通用小部件 ---------- */
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-weight: 700; flex: none; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 6px; background: #efebe3; white-space: nowrap; color: var(--muted); }
.tag.lit { background: var(--acc-soft); color: var(--acc); }
.tag.waitThem, .tag.waitMe { background: var(--blue-soft); color: var(--blue); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { background: #f1ede5; border-radius: 6px; padding: 4px 10px; font-size: 13px; }
.chip.badge small { margin-left: 4px; color: var(--muted); font-size: 11px; }
.chip.badge { background: #fdf3dc; color: #8a5a00; }
.chip.badge.off { background: #f4f2ef; color: var(--muted); opacity: .6; filter: grayscale(1); }
.code { letter-spacing: 2px; background: var(--acc-soft); color: var(--acc); padding: 2px 10px; border-radius: 8px; font-weight: 700; font-family: ui-monospace, Consolas, monospace; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.grid4 b { font-size: 22px; display: block; line-height: 1.2; }
.grid4 small { color: var(--muted); font-size: 12px; }
.tip { display: flex; align-items: center; gap: 12px; border-style: dashed; }
.tip p { flex: 1; margin: 0; font-size: 13px; }

/* ---------- 今日：问候 ---------- */
.hello { display: flex; align-items: stretch; gap: 14px; }
.cal { flex: none; width: 64px; border-radius: 8px; overflow: hidden; text-align: center; border: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
.cal small:first-child { background: var(--acc); color: #fff; font-size: 12px; line-height: 20px; }
.cal b { font-size: 30px; line-height: 1.15; font-weight: 800; font-family: Georgia, "Times New Roman", serif; padding-top: 2px; }
.cal small:last-child { font-size: 11px; color: var(--muted); padding-bottom: 4px; }
.hello h2 { margin: 2px 0 2px; font-size: 18px; }
.hello p { margin: 0; font-size: 13px; color: var(--muted); }
.hello .hello-main { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.segs { display: flex; gap: 4px; margin-top: 10px; }
.segs i { flex: 1; height: 4px; border-radius: 2px; background: #e8e2d6; }
.segs i.on { background: var(--acc); }

/* ---------- 今日：任务 ---------- */
ul.tasks { list-style: none; padding: 0; margin: 6px 0 0; }
ul.tasks li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid #efeae0; }
ul.tasks li:first-child { border-top: 0; }
ul.tasks li > div { flex: 1; min-width: 0; }
ul.tasks b { font-size: 15px; }
ul.tasks small { display: block; color: var(--muted); font-size: 12px; }
ul.tasks .check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #c9c1b2; display: grid; place-items: center; flex: none; }
ul.tasks li.done .check { background: var(--green); border-color: var(--green); }
ul.tasks li.done .check::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
ul.tasks li.done b { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .2); }
.meter { height: 6px; background: #f3eee8; border-radius: 99px; overflow: hidden; margin: 10px 0 4px; }
.meter i { display: block; height: 100%; background: var(--acc); transition: width .3s; border-radius: 99px; }

/* ---------- 新动态 ---------- */
.news { border-left: 3px solid var(--acc); }
.news ul, ul.msgs { list-style: none; padding: 0; margin: 8px 0 10px; }
.news li, ul.msgs li { padding: 9px 0; border-top: 1px dashed var(--line); }
.news li:first-child, ul.msgs li:first-child { border-top: 0; }
.news li a, ul.msgs li a { color: var(--ink); text-decoration: none; display: block; font-size: 14px; }
.news li small, ul.msgs li small { color: var(--muted); font-size: 12px; }
ul.msgs li.new a::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--acc); margin-right: 6px; vertical-align: middle; }

/* ---------- 雪人 ---------- */
.snow { text-align: center; }
.snow h2 { justify-content: flex-start; }
.snowman { display: block; width: 160px; height: auto; margin: 0 auto 4px; }
.snow-tap { display: block; margin: 0 auto; padding: 0; background: none; border: 0; box-shadow: none; cursor: pointer; transform-origin: 50% 100%; }
.snow-tap.hop { animation: hop .5s ease-out; }
@keyframes hop { 30% { transform: translateY(-10px) scaleY(1.04); } 60% { transform: translateY(0) scaleY(.95); } }
.snow-say { display: inline-block; position: relative; margin: 0 0 8px; font-size: 13px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 4px 12px; }
.snow-say::before { content: ""; position: absolute; left: 50%; top: -6px; width: 10px; height: 10px; background: #fff; border: solid var(--line); border-width: 1px 0 0 1px; transform: translateX(-50%) rotate(45deg); }
.snow-act { margin: 6px 0 2px; }
.snow-name { font-weight: 700; font-size: 16px; }
.snow-title { font-size: 12px; color: var(--muted); }
.snow-meter { height: 8px; border-radius: 99px; background: #e6eef8; overflow: hidden; margin: 10px auto 2px; max-width: 260px; }
.snow-meter i { display: block; height: 100%; background: var(--blue); border-radius: 99px; }
.melt { color: #b5541c; font-size: 12px; background: #fff1e6; display: inline-block; padding: 2px 10px; border-radius: 99px; margin: 6px 0 0; }
.dots { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 4px; }
.dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; opacity: .3; position: relative; }
.dot.on { opacity: 1; }
.dot.on::after { content: "✓"; position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: var(--green); color: #fff; font-size: 9px; display: grid; place-items: center; box-shadow: 0 0 0 2px #fff; }
.week { display: flex; gap: 6px; align-items: flex-end; height: 48px; margin-top: 12px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; }
.bar i { display: block; width: 60%; background: #cfe1f5; border-radius: 6px; min-height: 4px; }
.bar.today i { background: var(--blue); }
.bar small { font-size: 10px; color: var(--muted); }

/* ---------- 火花 ---------- */
.sparks { list-style: none; padding: 0; margin: 0; }
.sparks li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); }
.sparks li:first-child { border-top: 0; }
.sparks li > div { flex: 1; min-width: 0; }
.sparks small { display: block; color: var(--muted); font-size: 12px; }
.sparks li button { flex: none; }

/* ---------- 投票 ---------- */
.opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opts button { background: #fff; border: 1px solid var(--line); text-align: left; padding: 12px; border-radius: 8px; }
.pbar { margin: 10px 0; }
.pbar .pl { display: flex; justify-content: space-between; font-size: 14px; }
.pbar .pl em { font-style: normal; font-weight: 700; color: var(--muted); }
.pbar.mine .pl span { color: var(--acc); font-weight: 600; }
.pbar.mine .pl em { color: var(--acc); }
.pbar .pt { height: 8px; background: #f3eee8; border-radius: 99px; overflow: hidden; margin: 4px 0 2px; }
.pbar .pt i { display: block; height: 100%; background: #b9c9d9; border-radius: 99px; }
.pbar.mine .pt i { background: var(--acc); }
.pbar small { color: var(--muted); font-size: 11px; }
.pf-lock { margin: 10px 0 0; font-size: 13px; color: #8a5a00; background: #fff4dc; border-radius: 12px; padding: 8px 12px; }
.pf { margin-top: 12px; background: #faf7f3; border-radius: 14px; padding: 8px 12px; }
.pf p { margin: 0 0 4px; }
.pf-list { list-style: none; padding: 0; margin: 0; }
.pf-list li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px dashed var(--line); font-size: 13px; }
.pf-list li:first-child { border-top: 0; }
.pf-list .pf-name { flex: 1; min-width: 0; }
.pf-list .avatar { width: 28px; height: 28px; font-size: 12px; flex: none; }
.pf-list em { font-style: normal; color: var(--muted); max-width: 45%; text-align: right; }
.pf-list li.same em { color: var(--acc); font-weight: 600; }
.pf-list li.same em::after { content: " 🤝"; }
.pf-list .rel { font-style: normal; font-size: 10px; background: #ffe6d3; color: #b5541c; border-radius: 6px; padding: 1px 5px; margin-left: 4px; vertical-align: 1px; }
.pf-wait { margin: 10px 0 0; }
details.py-more { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 8px; }
details.py-more > summary { cursor: pointer; font-size: 13px; color: var(--muted); }
details.py-more .q { font-size: 15px; margin: 8px 0 0; }

/* ---------- 明天 ---------- */
.tomorrow { background: transparent; border-style: dashed; }
.tomorrow ul { list-style: none; margin: 6px 0 0; padding: 0; }
.tomorrow li { margin: 0; padding: 7px 0 7px 18px; font-size: 14px; position: relative; border-top: 1px dashed var(--line); }
.tomorrow li:first-child { border-top: 0; }
.tomorrow li::before { content: ""; position: absolute; left: 3px; top: 16px; width: 6px; height: 1.5px; background: var(--muted); }

/* ---------- 暗号 ---------- */
ul.hints { margin: 6px 0; padding: 0; list-style: none; }
ul.hints li { font-size: 13px; color: #a2531f; background: #fff4e9; border-radius: 10px; padding: 6px 10px; margin: 6px 0; }
.code-grid { display: flex; flex-direction: column; gap: 8px; align-items: center; margin: 18px 0; }
.code-row { display: flex; gap: 8px; }
.code-row i { width: 54px; height: 54px; display: grid; place-items: center; font-style: normal; font-size: 24px; font-weight: 700; border: 2px solid #ece4da; border-radius: 14px; background: #fff; }
.code-row i.m2 { background: var(--green); border-color: var(--green); color: #fff; }
.code-row i.m1 { background: var(--gold); border-color: var(--gold); color: #fff; }
.code-row i.m0 { background: #c9c3bb; border-color: #c9c3bb; color: #fff; }
.code-row i:not([class=""]) { animation: flip .35s ease-out both; }
@keyframes flip { from { transform: rotateX(90deg); } to { transform: none; } }
.legend { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; font-size: 12px; color: var(--muted); margin-top: 6px; }
.legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.legend .l2::before { background: var(--green); }
.legend .l1::before { background: var(--gold); }
.legend .l0::before { background: #c9c3bb; }
.code-result { text-align: center; }
.code-answer { font-size: 32px; font-weight: 800; letter-spacing: 8px; color: var(--acc); margin: 8px 0; }

/* ---------- 夸夸 ---------- */
.intro { padding: 2px 4px 10px; }
.intro h2 { margin: 0; font-size: 20px; }
.intro p { margin: 2px 0 0; font-size: 13px; }
.kq { }
.kq .q { font-size: 18px; display: flex; gap: 8px; align-items: center; }
.kq .q span { font-size: 26px; }
.cands { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.cand { min-width: 0; width: 100%; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 5px; background: #fff; border: 1px solid var(--line); text-align: left; padding: 12px; border-radius: 10px; }
.cand:active { border-color: var(--acc2); background: var(--acc-soft); }
.cand small { color: var(--muted); font-size: 11px; }
.cand-top { display: flex; gap: 8px; align-items: center; width: 100%; }
.cand-top > span:last-child { min-width: 0; flex: 1; }
.cand-top b { font-size: 15px; }
.cand-top small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.cand .rel { font-style: normal; font-size: 10px; background: #ffe6d3; color: #b5541c; border-radius: 6px; padding: 1px 5px; margin-left: 4px; vertical-align: 2px; }
.ctags { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0; }
.ctags em { font-style: normal; font-size: 11px; background: #f3f0e9; border-radius: 5px; padding: 1px 7px; color: #6f6a62; }
.ctags em.same { background: var(--blue-soft); color: #2c5d8f; font-weight: 700; }
.ctags em.none { color: var(--muted); }

.cand { position: relative; transition: transform .2s, opacity .25s, box-shadow .2s; }
.cand.dim { opacity: .35; transform: scale(.96); }
.cand.sent { opacity: 1; border-color: var(--acc2); box-shadow: 0 0 0 3px #ffd9c4, 0 8px 20px rgba(238, 114, 88, .25); animation: thump .4s ease-out; }
.cand.sent::after { content: "💌 已送出"; position: absolute; right: 8px; bottom: 8px; background: var(--acc); color: #fff; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; transform: rotate(-8deg); animation: stamp .3s ease-out; }
.burst { position: absolute; left: 50%; top: 40%; font-size: 18px; pointer-events: none; animation: burst .7s ease-out forwards; }
@keyframes thump { 40% { transform: scale(1.06); } }
@keyframes stamp { from { opacity: 0; transform: scale(1.8) rotate(-8deg); } to { opacity: 1; transform: rotate(-8deg); } }
@keyframes burst { from { opacity: 1; transform: translate(-50%, -50%) scale(.6); } to { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2); } }
.combo { font-size: 12px; font-weight: 700; color: #fff; background: var(--acc); padding: 2px 10px; border-radius: 99px; animation: thump .5s ease-out; }
.kq.gold { background: linear-gradient(135deg, #fffaf0 0%, #fff1cc 100%); box-shadow: 0 0 0 2px #f6d27a, 0 10px 28px rgba(242, 181, 68, .25); }
.kq.gold .meter i { background: linear-gradient(90deg, #ffd56b, var(--gold)); }
.gold-tip { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: #9a6a00; background: linear-gradient(90deg, #fff3c4, #ffe6a0, #fff3c4); background-size: 200% 100%; border-radius: 10px; padding: 6px 10px; animation: shine 2.4s linear infinite; }
.kq.gold .cand.sent { box-shadow: 0 0 0 3px #f6d27a, 0 8px 20px rgba(242, 181, 68, .35); border-color: var(--gold); }
.kq.gold .cand.sent::after { content: "✨ 金色送达"; background: var(--gold); }
@keyframes shine { to { background-position: -200% 0; } }

.round-done .rtitle { display: flex; flex-direction: column; align-items: center; gap: 2px; margin: 4px 0 10px; }
.rtitle span { font-size: 52px; line-height: 1.1; animation: thump .6s ease-out; }
.rtitle b { font-size: 22px; }
.rtitle small { color: var(--muted); font-size: 13px; }
ul.recap { list-style: none; padding: 0; margin: 12px 0; text-align: left; display: grid; gap: 6px; }
ul.recap li { display: flex; align-items: center; gap: 10px; background: #fbf8f5; border-radius: 12px; padding: 8px 10px; }
ul.recap li > span:nth-child(2) { min-width: 0; flex: 1; display: flex; flex-direction: column; }
ul.recap small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
ul.recap i, .gold-mark { font-style: normal; font-size: 11px; font-weight: 700; color: #9a6a00; background: #fff1c2; border-radius: 6px; padding: 1px 6px; flex: none; }
.gold-mark { margin-left: 6px; vertical-align: 2px; }
ul.recap li.gold, .kudo.gold { background: linear-gradient(135deg, #fffaf0, #fff1cc); box-shadow: inset 0 0 0 1px #f6d27a; }
@media (prefers-reduced-motion: reduce) { .burst, .gold-tip, .combo, .cand.sent, .rtitle span, .box-gift { animation: none; } }

/* ---------- 今晚盲盒 ---------- */
.card.box.open { border-color: #e7c98a; }
.box-teaser { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.box-teaser b { display: block; font-size: 16px; }
.box-teaser small { color: var(--muted); font-size: 13px; }
.box-gift { font-size: 40px; line-height: 1; animation: wiggle 2.6s ease-in-out infinite; transform-origin: 50% 80%; }
@keyframes wiggle { 0%, 80%, 100% { transform: rotate(0); } 84% { transform: rotate(-10deg); } 88% { transform: rotate(9deg); } 92% { transform: rotate(-6deg); } 96% { transform: rotate(3deg); } }
.box-hint { margin: 6px 0; font-size: 14px; font-weight: 600; color: #8a5a00; }
.bq { margin: 10px 0; }
.bq p { margin: 0 0 6px; font-size: 14px; }
.bq .opts button.on, .opts button.on { background: var(--acc-soft); border-color: var(--acc); color: var(--acc); font-weight: 600; }
button.block { display: block; width: 100%; margin-top: 12px; }
.box-reveal { background: #fff; border-radius: 16px; padding: 12px; margin: 6px 0 12px; box-shadow: inset 0 0 0 1px #f6d27a; }
.box-reveal p { margin: 0 0 4px; }
.box-reveal.miss { background: #faf7f3; box-shadow: none; }
.box-who { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; }
.box-who > div:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.box-who small { color: var(--muted); font-size: 12px; }
.box-score { text-align: center; flex: none; }
.box-score b { display: block; font-size: 22px; color: var(--acc); }
.box-score small { color: var(--muted); font-size: 12px; }
ul.box-items { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
ul.box-items li { display: flex; align-items: center; gap: 8px; font-size: 13px; background: #fbf8f5; border-radius: 10px; padding: 6px 10px; }
ul.box-items li span { flex: 1; min-width: 0; }
ul.box-items li em { font-style: normal; color: var(--muted); font-size: 12px; flex: none; }
ul.box-items li i { font-style: normal; color: var(--green); width: 14px; flex: none; }
ul.box-items li.same { background: var(--green-soft); }
.box-acts { margin-top: 10px; display: flex; justify-content: flex-end; }

/* ---------- 今日一签 ---------- */
.card.fortune.lv-top { border-color: #e7c98a; background: #fffaf0; }
.ft-idle { display: flex; align-items: center; gap: 12px; }
.ft-idle > div:nth-child(2) { flex: 1; min-width: 0; }
.ft-idle b { display: block; font-size: 16px; }
.ft-idle small { color: var(--muted); font-size: 13px; }
.ft-tube { font-size: 38px; line-height: 1; transform-origin: 50% 90%; }
.ft-tube.shake { animation: tubeShake .3s ease-in-out 3; }
@keyframes tubeShake { 25% { transform: rotate(-16deg); } 75% { transform: rotate(16deg); } }
.ft-level { font-weight: 800; font-size: 14px; color: #fff; background: var(--acc); border-radius: 8px; padding: 2px 10px; }
.lv-top .ft-level { background: var(--gold); }
.lv-ok .ft-level { background: var(--green); }
.ft-sign { display: flex; gap: 12px; align-items: center; margin: 10px 0 8px; animation: rise .4s ease-out; }
.ft-emoji { font-size: 42px; line-height: 1; flex: none; }
.ft-sign b { font-size: 19px; }
.ft-sign p { margin: 2px 0 0; font-size: 14px; }
.ft-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ft-meta span { background: #f1ede5; border-radius: 6px; padding: 3px 10px; font-size: 12px; }
.card.fortune { position: relative; }
.ft-acts { margin-top: 8px; justify-content: flex-start; }
.sheet { position: fixed; inset: 0; background: rgba(34, 37, 42, .6); z-index: 8; display: grid; place-items: center; padding: 20px; animation: fadeIn .2s ease-out; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet-box { background: var(--card); border-radius: var(--radius); padding: 14px; width: min(360px, 100%); text-align: center; }
.sheet-box img { display: block; width: 100%; max-height: 62vh; object-fit: contain; border-radius: 14px; }
.sheet-box p { margin: 10px 0 0; }
.sheet-box .row { margin-top: 10px; }
details.wb-more > summary { cursor: pointer; font-size: 12px; color: var(--muted); margin: 2px 0; }
.ci-box { position: relative; padding: 18px 16px 16px; animation: rise .3s ease-out; }
.ci-box .snowman { width: 120px; animation: hop .6s ease-out .15s; transform-origin: 50% 100%; }
.ci-box h2 { justify-content: center; margin: 4px 0 6px; }
.ci-list { list-style: none; padding: 0; margin: 0; text-align: left; }
.ci-list li { font-size: 14px; padding: 7px 2px; margin: 0; border-top: 1px solid #efeae0; }
.spark-acts { justify-content: flex-start; margin-top: 8px; }
.wb-boost { margin: 8px 0; background: #faf8f3; border-radius: 8px; padding: 9px 12px; }
.wb-boost b { display: block; font-size: 14px; margin-bottom: 6px; }
.wb-boost small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.wb-boost .chip { border: 1px solid #d6cfc2; box-shadow: none; background: #fff; color: var(--ink); font: inherit; font-size: 13px; text-decoration: none; cursor: pointer; padding: 5px 11px; min-height: 0; }
.sign-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.sg { background: #f4f2ef; border-radius: 12px; padding: 6px 2px; text-align: center; color: var(--muted); }
.sg span { display: block; font-size: 20px; line-height: 1.3; }
.sg small { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg.got { background: #eaf4ec; color: var(--ink); }
.sg.got.lv-up { background: #ffeee6; }
.sg.got.lv-top { background: #fff1cc; box-shadow: inset 0 0 0 1px #f6d27a; }

/* ---------- 学院周赛 ---------- */

.wb-last { margin: 8px 0 0; font-size: 13px; background: #fff1cc; border-radius: 10px; padding: 5px 10px; color: #8a5a00; }
.wb-mine { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; background: #faf8f3; border-radius: 8px; padding: 10px 12px; }
.wb-mine > div:first-child { flex: 1; min-width: 0; }
.wb-mine b { display: block; font-size: 18px; }
.wb-mine small { color: var(--muted); font-size: 12px; }
.wb-me { text-align: right; flex: none; }
.wb-me b { color: var(--acc); }
.wb-me b i { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 400; }
.wb-tip { margin: 6px 0; font-weight: 600; color: #b5541c; }
ol.wb-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 5px; }
ol.wb-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
ol.wb-list li.me { font-weight: 700; color: var(--acc); }
.wb-rank { width: 20px; height: 20px; border-radius: 50%; background: #f1ebe4; display: grid; place-items: center; font-size: 11px; flex: none; }
ol.wb-list li:nth-child(1) .wb-rank { background: #f2b544; color: #fff; }
ol.wb-list li:nth-child(2) .wb-rank { background: #b8c1cc; color: #fff; }
ol.wb-list li:nth-child(3) .wb-rank { background: #d9a273; color: #fff; }
.wb-name { width: 42%; flex: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-bar { flex: 1; height: 8px; background: #f1ebe4; border-radius: 99px; overflow: hidden; }
.wb-bar i { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
ol.wb-list em { font-style: normal; width: 34px; text-align: right; flex: none; }

/* ---------- 成就 ---------- */
.ach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ach { background: #f4f2ef; border-radius: 14px; padding: 8px 6px; text-align: center; color: var(--muted); }
.ach span { display: block; font-size: 24px; filter: grayscale(1); opacity: .5; }
.ach b { display: block; font-size: 13px; }
.ach small { display: block; font-size: 10px; line-height: 1.35; margin-top: 2px; }
.ach.got { background: #fff8e8; color: var(--ink); box-shadow: inset 0 0 0 1px #ecd29a; }
.ach.got span { filter: none; opacity: 1; }
.ach.got small { color: #8a5a00; }

/* ---------- 雪人衣橱 ---------- */
details.wd { margin-top: 12px; border-top: 1px dashed var(--line); padding-top: 10px; text-align: left; }
details.wd > summary { cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; list-style: none; }
details.wd > summary::-webkit-details-marker { display: none; }
details.wd > summary small { color: var(--muted); font-size: 12px; }
details.wd > summary::after { content: '展开'; font-size: 12px; color: var(--blue); }
details.wd[open] > summary::after { content: '收起'; }
.wd-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: 10px 0 6px; }
.wd-it { position: relative; border: 0; font: inherit; color: var(--ink); background: #f4f2ef; border-radius: 12px; padding: 6px 2px 5px; text-align: center; cursor: pointer; min-width: 0; }
.wd-it span { display: block; font-size: 22px; line-height: 1.25; }
.wd-it small { display: block; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-it i { position: absolute; top: 2px; right: 4px; font-size: 9px; font-style: normal; color: var(--muted); }
.wd-it em { position: absolute; top: -5px; left: 50%; transform: translateX(-50%); font-size: 9px; font-style: normal; background: var(--blue); color: #fff; border-radius: 6px; padding: 0 5px; line-height: 14px; }
.wd-it.r-N { background: #eef3f8; }
.wd-it.r-R { background: #e9e6fb; box-shadow: inset 0 0 0 1px #c3b6f0; }
.wd-it.r-SR { background: linear-gradient(135deg, #fffaf0, #ffe7a8); box-shadow: inset 0 0 0 1px #f2b544; }
.wd-it.on { outline: 2px solid var(--blue); outline-offset: 1px; }
.wd-it.off { background: #f4f2ef; box-shadow: none; color: var(--muted); cursor: default; }
.wd-it.off span { filter: grayscale(1) brightness(.6); opacity: .25; }
.gift-btn { display: block; width: 100%; margin-top: 10px; border: 1px dashed var(--gold); border-radius: 8px; padding: 11px 12px; font: inherit; font-weight: 700; color: #7a5200; background: #fff8e8; cursor: pointer; }
.gift-note { margin: 10px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.ci-meta { margin: 0 0 8px; font-size: 13px; color: var(--blue); }
.ci-drop-h { margin: 4px 0 4px; font-size: 12px; color: var(--muted); letter-spacing: 2px; }
.drop { position: relative; margin: 0 auto 10px; padding: 10px 12px 10px; border-radius: 10px; background: #eef3f8; text-align: center; animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) .35s both; }
.drop-tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 8px; background: #fff; color: var(--blue); }
.drop-emoji { display: block; font-size: 42px; line-height: 1.2; margin: 2px 0; }
.drop b { display: block; font-size: 16px; }
.drop small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.drop.r-R { background: linear-gradient(135deg, #f1eefe, #e2dafb); }
.drop.r-R .drop-tag { color: #6b52c8; }
.drop.r-SR { background: linear-gradient(135deg, #fffaf0, #ffe39a); box-shadow: 0 0 0 2px #f2b544, 0 0 24px rgba(242, 181, 68, .6); }
.drop.r-SR .drop-tag { color: #fff; background: #e39b1b; }
@keyframes pop { from { opacity: 0; transform: scale(.4) rotate(-6deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ft-tube.shake, .ft-sign, .sheet, .snow-tap.hop, .ci-box, .ci-box .snowman, .drop, .gift-btn { animation: none; } }

/* ---------- 消息与收件箱 ---------- */
ul.inbox { padding: 0; margin: 0; }
.kudo { list-style: none; background: #faf8f3; border-radius: 10px; padding: 12px; margin: 8px 0; }
.kudo .q { margin: 0; font-size: 15px; }
.kudo.new { background: #fff; box-shadow: inset 3px 0 0 var(--acc), inset 0 0 0 1px var(--line); }
.kudo.new .q::after { content: "新"; margin-left: 6px; background: var(--acc); color: #fff; font-size: 10px; border-radius: 6px; padding: 1px 5px; vertical-align: 2px; }
.kudo .meta { color: var(--muted); font-size: 12px; margin: 2px 0 8px; }
.kudo-acts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- 我的 ---------- */
.me-head { display: flex; gap: 14px; align-items: center; }
.me-head .avatar { width: 54px; height: 54px; font-size: 22px; }
.me-head h2 { margin: 0; font-size: 19px; }
.me-head p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.me-head .mytags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.me-head .mytags em { font-style: normal; font-size: 11px; background: #f1ede5; border-radius: 5px; padding: 1px 7px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.stats b { font-size: 21px; display: block; line-height: 1.2; }
.stats small { color: var(--muted); font-size: 12px; }

.week-card .grid4 { margin: 10px 0; }
.week-card .grid4 > div { background: #faf8f3; border-radius: 8px; padding: 8px 0; }
.invite-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 14px; }
.tagpick label { margin: 0; padding: 5px 11px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; color: var(--ink); background: #fff; cursor: pointer; user-select: none; transition: background .15s; }
.tagpick label.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.tagpick input { display: none; }
details.fold > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: "展开"; margin-left: auto; font-size: 12px; font-weight: 400; color: var(--muted); }
details.fold[open] > summary::after { content: "收起"; }
details.fold[open] > summary { margin-bottom: 10px; }
.dorm-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 8px; align-items: center; }

/* ---------- 欢迎页 ---------- */
.hero { text-align: center; padding: 4px 4px 6px; }
.hero h2 { font-size: 20px; margin: 4px 0 4px; line-height: 1.4; }
.hero > p { margin: 0 0 14px; color: var(--muted); font-size: 13px; }
.hero .snowman { width: 132px; }
.feats { list-style: none; counter-reset: f; padding: 0; margin: 0 0 14px; text-align: left; border-top: 1px solid var(--line); }
.feats li { counter-increment: f; display: flex; align-items: baseline; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.feats li::before { content: "0" counter(f); font: 700 12px Georgia, serif; color: var(--acc); }
.feats b { flex: none; font-size: 14px; width: 4.5em; }
.feats span { color: var(--muted); }
.invite-banner { background: var(--acc-soft); color: var(--acc); border-radius: 8px; padding: 10px 14px; font-size: 14px; margin: 0 0 10px; }

/* ---------- 默契测试 ---------- */
.pair-code { font-size: 36px; letter-spacing: 8px; font-weight: 800; color: var(--acc); margin: 12px 0; font-family: ui-monospace, Consolas, monospace; background: var(--acc-soft); border-radius: 10px; padding: 8px 0; }
.pair-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
.pair-opts button { padding: 20px 12px; background: #faf6f2; border: 1px solid var(--line); font-size: 15px; border-radius: 16px; }
.pair-opts button.on { background: var(--acc-soft); border-color: var(--acc2); color: var(--acc); font-weight: 700; }
.pair-score { font-size: 64px; font-weight: 800; color: var(--acc); line-height: 1.05; margin-top: 8px; }
.pair-score span { font-size: 20px; color: var(--muted); font-weight: 400; }
.pair-result h2 { margin: 8px 0 4px; justify-content: center; }
.pair-result .row { justify-content: center; }
.pair-squares { display: flex; gap: 5px; justify-content: center; margin: 14px 0; }
.pair-squares i { display: block; width: 20px; height: 20px; border-radius: 6px; background: #ece5dc; }
.pair-squares i.hit { background: var(--green); }
.pair-review, .pair-items { list-style: none; padding: 0; margin: 10px 0 16px; }
.pair-review li, .pair-items li { border-top: 1px dashed var(--line); padding: 9px 0; }
.pair-review b, .pair-items b { display: block; font-size: 14px; font-weight: 600; }
.pair-review small, .pair-items small { color: var(--muted); font-size: 12px; }
.pair-items li.hit small { color: #2f7a48; }
.pair-items li.miss small { color: #b5541c; }

/* ---------- 数据后台 ---------- */
.admin table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin td, .admin th { border-bottom: 1px solid var(--line); padding: 7px 4px; text-align: right; }
.admin td:first-child, .admin th:first-child { text-align: left; }

@media (max-width: 370px) {
  .cands { grid-template-columns: minmax(0, 1fr); }
  .code-row i { width: 46px; height: 46px; font-size: 20px; }
  .sign-grid { grid-template-columns: repeat(4, 1fr); }
  .ach-grid { grid-template-columns: repeat(2, 1fr); }
  .wd-grid { grid-template-columns: repeat(4, 1fr); }
  .wb-name { width: 36%; }
}
