/* =========================================================
   公告通知 / 分组卡片墙 / BD 小人
   ========================================================= */

/* ---------- 顶栏铃铛 ---------- */
.bell-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.bell-btn:hover { background: var(--grey-soft); color: var(--ink); }
.bell-btn .ico { width: 20px; height: 20px; }
.bell-dot { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.bell-btn:has(.bell-dot:not(.hidden)) .ico { animation: ring 2.4s ease-in-out 1s 2; transform-origin: 50% 10%; }
@keyframes ring { 0%, 60%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-12deg); } 50% { transform: rotate(6deg); } }
.bell-menu { width: 340px; padding: 0; overflow: hidden; }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.bell-head .muted { font-size: 12px; }
.menu .bell-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; height: auto; padding: 10px 14px; border-radius: 0; border-bottom: 1px solid var(--line-2); }
.menu .bell-item .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.menu .bell-item .d { font-size: 12px; color: var(--muted); }
.menu .bell-item.unread { background: #f6f9ff; }
.menu .bell-item.unread .t { color: var(--ink); font-weight: 600; }
.menu .bell-all { justify-content: center; height: 40px; border-radius: 0; color: var(--brand); }
.tabs a.has-dot::before { content: ""; position: absolute; top: 16px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

/* ---------- 首页公告条 ---------- */
.nstrip { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.nstrip.has-new { border-color: #f3c58f; background: linear-gradient(90deg, #fff7ec, #fff 60%); }
.nstrip-ico { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); }
.nstrip.has-new .nstrip-ico { background: #ffe8cc; color: #c66a00; }
.nstrip-ico .ico { width: 20px; height: 20px; }
.nstrip.has-new .nstrip-ico .ico { animation: ring 2.4s ease-in-out .6s 2; transform-origin: 50% 10%; }
.nstrip-ico i { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.nstrip-body { flex: 1; min-width: 0; }
.nstrip-label { font-size: 12px; color: var(--muted); }
.nstrip.has-new .nstrip-label { color: #c66a00; font-weight: 600; }
.nstrip-track { position: relative; height: 24px; overflow: hidden; }
.nstrip-item { position: absolute; inset: 0; display: flex; align-items: center; gap: 8px; width: 100%; padding: 0; border: 0; background: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer; opacity: 0; transform: translateY(100%); transition: opacity .35s, transform .35s; }
.nstrip-item.on { opacity: 1; transform: none; }
.nstrip-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.nstrip-item:hover .t { color: var(--brand); text-decoration: underline; }
.nstrip-item .d { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pin { display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--red-soft); color: var(--red); font-size: 11.5px; font-weight: 700; }

/* ---------- 公告页 ---------- */
.nlist { display: grid; gap: 12px; }
.ncard { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.ncard:hover { border-color: #c4d2ea; box-shadow: var(--shadow-2); transform: translateY(-1px); }
.ncard.unread { border-left: 4px solid var(--brand); }
.ncard.pinned { background: linear-gradient(90deg, #fff6f6, #fff 40%); }
.ncard-side { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 64px; border-radius: 12px; background: var(--sunk); }
.ncard-side .day { font-size: 24px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.ncard-side .mon { margin-top: 4px; font-size: 12px; color: var(--muted); }
.ncard .meta { display: flex; gap: 8px; align-items: center; }
.ncard h3 { margin: 6px 0 4px; font-size: 16px; }
.ncard.unread h3 { color: var(--brand-d); }
.ncard p { margin: 0; color: var(--ink-2); line-height: 1.7; white-space: pre-wrap; }
.new-dot { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--brand); font-weight: 600; }
.new-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand); }
.notice-body { white-space: pre-wrap; line-height: 1.8; color: var(--ink); }

/* ---------- 分组卡片墙 ---------- */
.gstats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.gstats > div { display: flex; align-items: baseline; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gstats b { font-size: 26px; font-variant-numeric: tabular-nums; }
.gstats span { color: var(--muted); font-size: 13px; }
.vchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.vchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 13px; cursor: pointer; transition: background .15s, border-color .15s; }
.vchip:hover { border-color: #c4d2ea; }
.vchip i { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.vchip .vdot { width: 8px; height: 8px; border-radius: 50%; background: var(--vc); }
.vchip.on { border-color: var(--vc, var(--ink)); background: color-mix(in srgb, var(--vc, var(--ink)) 10%, white); color: var(--ink); font-weight: 600; }
.vchip.on i { color: var(--ink-2); }
.vavatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--vs); height: var(--vs); border-radius: calc(var(--vs) * .3); background: color-mix(in srgb, var(--vc) 14%, white); color: var(--vc); font-weight: 800; font-size: calc(var(--vs) * .45); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--vc) 25%, white); }

.ggrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.gcard { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); cursor: pointer; overflow: hidden;
  transition: transform .18s ease-out, box-shadow .18s, border-color .18s; animation: gIn .4s ease-out both; animation-delay: calc(var(--i) * 35ms); }
.gcard::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--vc); opacity: .85; }
.gcard:hover, .gcard:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(23, 36, 64, .12); border-color: color-mix(in srgb, var(--vc) 35%, white); }
@keyframes gIn { from { opacity: 0; transform: translateY(8px); } }
.gcard header { display: flex; align-items: center; gap: 10px; }
.gname { min-width: 0; flex: 1; }
.gname b { display: block; font-size: 15.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gname span { font-size: 12.5px; color: var(--muted); }
.gflag { flex: none; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--mint-soft); color: var(--mint); font-size: 12px; font-weight: 600; line-height: 22px; }
.gsrc { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%; height: 24px; padding: 0 8px; border-radius: 6px; background: var(--sunk); color: var(--ink-2); font-size: 12.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gsrc .ico { width: 13px; height: 13px; flex: none; }
.gdesc { margin: 0; min-height: 2.6em; color: var(--ink-2); font-size: 13px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.meters { display: grid; gap: 6px; padding: 10px 12px; border-radius: 10px; background: var(--sunk); }
.meter { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; font-size: 12px; }
.meter .ml { color: var(--muted); font-weight: 600; }
.meter .mv { color: var(--ink-2); font-variant-numeric: tabular-nums; min-width: 76px; text-align: right; }
.mbar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.mbar i { height: 7px; border-radius: 2px; background: #e1e7f1; }
.mbar i.on { background: var(--vc, var(--brand)); animation: mFill .45s ease-out both; animation-delay: var(--d); transform-origin: left; }
@keyframes mFill { from { transform: scaleX(0); } }
.gcard footer { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line); font-size: 12.5px; min-height: 30px; }
.gcl { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; }
.gcl .d { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gcl .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.gmore { flex: none; color: var(--brand); font-size: 12.5px; opacity: .6; transition: opacity .15s, transform .15s; }
.gcard:hover .gmore { opacity: 1; transform: translateX(2px); }
.gmore::after { content: " ›"; }
.gd-head { display: flex; align-items: center; gap: 14px; }
.gd-name { font-size: 18px; font-weight: 700; }
.gd-meters { display: grid; gap: 8px; padding: 14px; border-radius: 12px; background: var(--sunk); }
.gd-meters .meter { font-size: 13px; }
.gd-meters .mbar i { height: 10px; }
.cl-list.big .cl-text { font-size: 14px; }
.cl-list.big li { padding-bottom: 14px; }
@media (max-width: 640px) { .gstats { grid-template-columns: 1fr; } }

/* ---------- 右下角小兔子 ---------- */
.buddy { position: fixed; right: 24px; bottom: 16px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; pointer-events: none; }
.buddy > * { pointer-events: auto; }
.buddy-bubble { position: relative; width: 250px; margin: 0 34px 6px 0; padding: 12px 14px 10px; border-radius: 16px 16px 4px 16px; background: #fff; color: var(--ink); font-size: 13.5px; line-height: 1.55; box-shadow: 0 10px 28px rgba(23, 36, 64, .18); border: 1px solid #e6edf8; transition: opacity .22s, transform .22s; animation: bubbleIn .5s ease-out .6s both; }
.buddy-bubble::after { content: ""; position: absolute; right: 22px; bottom: -8px; width: 14px; height: 14px; background: #fff; border-right: 1px solid #e6edf8; border-bottom: 1px solid #e6edf8; transform: rotate(45deg); }
.bb-text { min-height: 2.9em; padding-right: 14px; cursor: pointer; }
.bb-text:hover { color: var(--brand-d); }
.buddy[data-mood=think] .bb-text::before { content: "💭 "; }
.bb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.bb-chips button { height: 24px; padding: 0 9px; border: 1px solid #cfdcf3; border-radius: 12px; background: #f5f8ff; color: var(--brand-d); font: inherit; font-size: 12px; cursor: pointer; }
.bb-chips button:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.bb-x { position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; }
.bb-x:hover { background: var(--grey-soft); color: var(--ink); }
.buddy.open .buddy-bubble { opacity: 0; transform: scale(.9); pointer-events: none; }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(10px) scale(.9); } }

.buddy-stage { position: relative; width: 132px; height: 162px; }
.buddy-btn { position: absolute; inset: 0 0 14px; padding: 0; border: 0; background: none; cursor: pointer; }
.buddy-btn img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 10px 16px rgba(10, 40, 120, .28)); animation: bob 3.4s ease-in-out infinite; transform-origin: 50% 100%; transition: transform .25s; }
.buddy-btn:hover img { animation-play-state: paused; transform: rotate(-7deg) scale(1.07); }
.buddy-btn:active img { transform: scale(.94); }
@keyframes bob { 50% { transform: translateY(-8px); } }
.buddy-shadow { position: absolute; left: 50%; bottom: 10px; width: 70px; height: 12px; margin-left: -35px; border-radius: 50%; background: radial-gradient(rgba(23, 36, 64, .28), transparent 70%); animation: shadow 3.4s ease-in-out infinite; }
@keyframes shadow { 50% { transform: scale(.75); opacity: .6; } }
.buddy-tag { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; padding: 3px 10px; border-radius: 12px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 600; box-shadow: 0 4px 12px rgba(47, 107, 240, .4); }
.buddy-tag i { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #fff; color: var(--brand); font-style: normal; font-size: 11px; line-height: 18px; text-align: center; }
/* 头顶冒出的小符号 */
.buddy-fx { position: absolute; left: 0; right: 0; top: 10px; height: 0; pointer-events: none; }
.buddy-fx span { position: absolute; top: 0; font-weight: 800; font-size: 18px; color: var(--brand); text-shadow: 0 2px 6px rgba(47, 107, 240, .25); animation: puff 2s ease-out forwards; }
.buddy-fx span:nth-child(3n) { color: #f0a020; }
.buddy-fx span:nth-child(3n+1) { color: #e5537a; }
@keyframes puff { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; transform: translate(calc(var(--dx) * .3), -12px) scale(1.1); } 100% { opacity: 0; transform: translate(var(--dx), -70px) scale(.8); } }
/* 闲置小动作 */
.buddy.wiggle .buddy-btn img { animation: wiggle 1.1s ease-in-out; }
@keyframes wiggle { 20% { transform: rotate(-9deg); } 40% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(3deg); } }
.buddy.peek .buddy-btn img { animation: peek 1.2s ease-in-out; }
@keyframes peek { 40%, 60% { transform: translateX(-10px) rotate(-10deg); } }
.buddy.jump .buddy-btn img, .buddy.hop .buddy-btn img { animation: hop .9s ease-out; }
@keyframes hop { 20% { transform: translateY(-26px) rotate(-6deg); } 45% { transform: translateY(0) scaleY(.92); } 65% { transform: translateY(-10px) rotate(4deg); } 85% { transform: translateY(0); } }
/* 收起成右侧小标签 */
.buddy-tab { display: none; align-items: center; gap: 6px; height: 44px; padding: 0 12px 0 4px; margin-right: -24px; border: 0; border-radius: 22px 0 0 22px; background: var(--brand); color: #fff; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-2); transition: transform .2s; }
.buddy-tab:hover { transform: translateX(-4px); }
.buddy-tab img { height: 40px; width: auto; }
.buddy.min .buddy-bubble, .buddy.min .buddy-stage, .buddy.min .buddy-pop { display: none; }
.buddy.min .buddy-tab { display: inline-flex; }

.buddy-pop { position: absolute; right: 0; bottom: 172px; width: min(400px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-3); transform-origin: 90% 100%; animation: popIn .22s ease-out; }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.95); } }
.bp-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); background: linear-gradient(120deg, #eef4ff, #e9f9f6); border-radius: 18px 18px 0 0; }
.bp-head img { height: 40px; width: auto; }
.bp-head b { display: block; font-size: 15px; }
.bp-head .muted { font-size: 12px; }
.bp-head .x { margin-left: auto; width: 28px; height: 28px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.bp-head .x:hover { background: rgba(255, 255, 255, .7); color: var(--ink); }
.bp-form { display: grid; gap: 10px; padding: 12px 16px 14px; }
.bp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.bp-chip { height: 28px; padding: 0 10px; border: 1px dashed #bcd0f3; border-radius: 14px; background: #f6f9ff; color: var(--brand-d); font: inherit; font-size: 12.5px; cursor: pointer; }
.bp-chip:hover { border-style: solid; background: var(--brand-soft); }
.bp-form .seg label { height: 28px; font-size: 12.5px; }
.bp-foot { display: flex; align-items: center; gap: 12px; }
.bp-foot .muted { font-size: 12px; }
.bp-foot .btn { margin-left: auto; }
@media (max-width: 640px) { .buddy { right: 10px; bottom: 10px; } .buddy-stage { width: 84px; height: 104px; } .buddy-bubble { width: 200px; font-size: 12.5px; } .bb-chips { display: none; } .buddy-pop { bottom: 112px; } }
@media print { .buddy { display: none; } }

/* ---------- BD有话说 页 ---------- */
.fb-hero { position: relative; overflow: hidden; display: flex; gap: 20px; padding: 24px 200px 24px 28px; border-radius: 18px; background: linear-gradient(120deg, #eef4ff, #e9f9f6); border: 1px solid #dbe6f7; }
.fb-hero h1 { font-size: 22px; }
.fb-hero p { margin: 6px 0 16px; color: var(--ink-2); max-width: 60ch; }
.fb-mascot { position: absolute; right: 34px; bottom: -18px; height: 170px; width: auto; filter: drop-shadow(0 10px 18px rgba(10, 40, 120, .2)); }
.fb-topics { display: flex; flex-wrap: wrap; gap: 10px; }
.fb-topic { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border: 1px solid #d3def2; border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.fb-topic b { font-size: 14px; color: var(--ink); }
.fb-topic span { font-size: 12.5px; color: var(--muted); }
.fb-topic:hover { transform: translateY(-2px); border-color: var(--brand); box-shadow: 0 8px 18px rgba(47, 107, 240, .12); }
@media (max-width: 760px) { .fb-hero { padding-right: 28px; } .fb-mascot { display: none; } }
.fb-stats { display: flex; gap: 6px; flex-wrap: wrap; }
.chat { display: grid; gap: 12px; }
.chat-row { display: flex; justify-content: flex-end; }
.chat-bubble { max-width: 92%; padding: 12px 14px; border-radius: 16px 16px 4px 16px; background: #f1f6ff; border: 1px solid #dbe6f7; }
.chat-bubble .meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.chat-bubble .meta .link { margin-left: auto; font-size: 12px; }
.chat-bubble .content { margin-top: 6px; white-space: pre-wrap; line-height: 1.7; color: var(--ink); }

@media (prefers-reduced-motion: reduce) { .gcard, .mbar i.on, .buddy-btn img, .buddy-bubble, .buddy-shadow, .buddy-fx span { animation: none !important; } }
