:root {
  --bg: #fbf6ee;
  --bg2: #fffdf9;
  --ink: #1d1b17;
  --muted: #7b7466;
  --line: #e7ded0;
  --card: #ffffff;
  --a: #ef5a4c;          /* 红方 */
  --a-soft: #fde8e5;
  --b: #3f6fe0;          /* 蓝方 */
  --b-soft: #e5ecfd;
  --gold: #d59a26;
  --green: #2f9e6b;
  --shadow: 0 2px 0 rgba(29,27,23,.06), 0 12px 30px -18px rgba(29,27,23,.5);
  --radius: 16px;
}

* { box-sizing: border-box; }
/* hidden 属性必须压过下面各种 display 声明，否则弹窗关不掉 */
[hidden] { display: none !important; }
html, body { margin: 0; padding: 0; }
body {
  background:
    radial-gradient(1200px 500px at 80% -10%, #ffe9d6 0%, transparent 60%),
    radial-gradient(900px 400px at 0% 0%, #e6efff 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft Yahei", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------- 顶栏 */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(255,253,249,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  font-size: 22px; width: 40px; height: 40px; display: grid; place-items: center;
  background: var(--ink); border-radius: 12px; transform: rotate(-4deg);
}
.brand-text { font-weight: 800; font-size: 20px; letter-spacing: .5px; line-height: 1.1; }
.brand-text b { color: var(--a); }
.brand-text small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 2px; }

.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a {
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--muted);
  transition: .15s;
}
.nav a:hover { background: #fff; color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }

.account { display: flex; align-items: center; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 14px; font-weight: 700; font-size: 14px;
}
.chip.gold { color: var(--gold); }

/* ---------------------------------------------------- 按钮 */
.btn {
  font: inherit; font-weight: 700; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  padding: 9px 18px; border-radius: 999px; transition: .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.danger { background: var(--a); color: #fff; border-color: var(--a); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 12px; font-size: 13px; }
.btn.wide { width: 100%; }

/* ---------------------------------------------------- 布局 */
main { flex: 1; width: min(1100px, 100%); margin: 0 auto; padding: 28px clamp(16px, 4vw, 32px) 60px; }
.section-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; font-size: 26px; letter-spacing: -.3px; }
.section-head p { margin: 0; color: var(--muted); font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty .big { font-size: 44px; display: block; margin-bottom: 8px; }

/* ---------------------------------------------------- 擂台 */
.arena-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 18px;
}
.round-badge {
  background: var(--ink); color: #fff; border-radius: 999px; padding: 6px 16px;
  font-weight: 800; letter-spacing: 1px; font-size: 13px;
}
.countdown { display: flex; align-items: center; gap: 10px; }
.countdown .clock {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 30px; letter-spacing: -.5px;
}
.countdown .lbl { color: var(--muted); font-size: 13px; }

/* 注意：这里不能用 flex —— 句中的 <b> 会变成独立 flex 项，
   被 gap 撑开且可单独换行，英文长句会散成好几行 */
.tie-banner {
  background: linear-gradient(90deg, #fff6e2, #fffdf7);
  border: 1px dashed var(--gold); color: #8a6412;
  border-radius: 14px; padding: 12px 16px; margin-bottom: 18px;
  font-weight: 600; line-height: 1.6;
}
.tie-banner b { font-weight: 800; }

/* 横向计票条：左红方 / 右蓝方 */
.tug { margin: 0 0 20px; }
.tug-labels {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; margin-bottom: 8px; font-size: 14px; flex-wrap: wrap;
}
.tug-labels b { font-size: 17px; }
.tug-labels .ta { color: var(--a); font-weight: 700; }
.tug-labels .tb { color: var(--b); font-weight: 700; text-align: right; }
.tug-bar {
  display: flex; height: 26px; border-radius: 999px; overflow: hidden;
  background: #f0ebe2; border: 1px solid var(--line); position: relative;
  box-shadow: inset 0 1px 3px rgba(29, 27, 23, .08);
}
.tug-bar i {
  display: block; height: 100%; transition: width .55s cubic-bezier(.4, 0, .2, 1);
  position: relative;
}
.tug-bar .seg-a { background: linear-gradient(90deg, #f8867d, var(--a)); }
.tug-bar .seg-b { background: linear-gradient(90deg, var(--b), #7ba0f0); }
.tug-mid {
  position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: rgba(29, 27, 23, .22); transform: translateX(-1px); pointer-events: none;
}
.tug.empty .tug-bar .seg-a,
.tug.empty .tug-bar .seg-b { background: #e3dbcd; }
.tug-note {
  text-align: center; font-size: 13px; color: var(--muted); margin-top: 8px; font-weight: 600;
}
.tug-note.lead-a { color: var(--a); }
.tug-note.lead-b { color: var(--b); }

.vs-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch;
}
@media (max-width: 820px) { .vs-grid { grid-template-columns: 1fr; } }

.vs-orb {
  align-self: center; font-weight: 900; font-style: italic; font-size: 26px;
  background: var(--ink); color: #fff; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; box-shadow: var(--shadow);
}

.joke-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 14px; position: relative;
  box-shadow: var(--shadow); overflow: hidden;
}
.joke-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; }
.joke-card.side-a::before { background: var(--a); }
.joke-card.side-b::before { background: var(--b); }
.joke-card.voted-mine { outline: 2px solid var(--ink); outline-offset: 2px; }

.jc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.side-tag { font-weight: 800; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; }
.side-a .side-tag { color: var(--a); }
.side-b .side-tag { color: var(--b); }
.jc-author { color: var(--muted); font-size: 14px; }
.jc-author a { font-weight: 700; color: var(--ink); border-bottom: 1px dashed var(--line); }

.jc-body { font-size: 19px; line-height: 1.75; white-space: pre-wrap; word-break: break-word; flex: 1; }

.bar { height: 10px; border-radius: 999px; background: #f0ebe2; overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 999px; transition: width .4s ease; }
.side-a .bar i { background: var(--a); }
.side-b .bar i { background: var(--b); }
.jc-stats { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.jc-stats b { color: var(--ink); font-size: 16px; }

.jc-actions { display: flex; gap: 8px; }
.jc-actions .btn { flex: 1; }
.btn.vote-a { background: var(--a-soft); border-color: transparent; color: #b02a1f; }
.btn.vote-a:hover { background: var(--a); color: #fff; }
.btn.vote-b { background: var(--b-soft); border-color: transparent; color: #26469b; }
.btn.vote-b:hover { background: var(--b); color: #fff; }
.btn.report { flex: 0 0 auto; }

.medal-strip {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(90deg, #fff8e8, #fffdf8);
  border: 1px solid #f0dfb6; border-radius: 12px; padding: 10px 14px; margin-top: 20px;
}
.medal {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13px;
  background: #fff; border: 1px solid #eadcb8; color: #8a6412; border-radius: 999px; padding: 5px 12px;
}

/* 投稿框 */
.submit-box { margin-top: 24px; padding: 20px; }
.submit-box h3 { margin: 0 0 4px; font-size: 18px; }
.submit-box p.hint { margin: 0 0 12px; }
textarea, input {
  font: inherit; width: 100%; padding: 11px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fffdf9; color: var(--ink); resize: vertical;
}
textarea:focus, input:focus { outline: 2px solid #d9c9b0; border-color: transparent; }
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.req { color: var(--a); }
.hint { color: var(--muted); font-size: 13px; }
.err { color: #c0392b; font-size: 14px; font-weight: 600; }

.orig-note {
  background: #f6f1e8; border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0; padding: 10px 14px; margin: 0 0 12px !important;
  line-height: 1.6;
}
.orig-note b { color: var(--ink); }

.queue-mine { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.queue-mine span {
  font-size: 13px; background: #f6f1e8; border-radius: 8px; padding: 6px 10px; color: var(--muted);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* ---------------------------------------------------- 列表通用 */
.list { display: grid; gap: 12px; }
.row {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  display: flex; gap: 16px; align-items: center; box-shadow: var(--shadow);
}
.row .grow { flex: 1; min-width: 0; }
.row .txt { white-space: pre-wrap; word-break: break-word; }
.row .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }

.like-wrap { text-align: center; min-width: 110px; }
.like-count { font-weight: 800; font-size: 20px; }
.progress { height: 6px; border-radius: 999px; background: #f0ebe2; margin: 6px 0 8px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--green); }

.rank-num {
  font-weight: 900; font-size: 20px; width: 44px; text-align: center; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.rank-1 { color: var(--gold); } .rank-2 { color: #9aa3ad; } .rank-3 { color: #c08a52; }
.pill {
  font-size: 12px; font-weight: 700; border-radius: 999px; padding: 3px 10px;
  background: #f4efe6; color: var(--muted);
}
.pill.ban { background: #fde8e5; color: #b02a1f; }
.pill.win { background: #e6f6ee; color: var(--green); }

/* ---------------------------------------------------- 个人资料 */
.profile-head {
  display: flex; gap: 20px; align-items: center; padding: 24px; flex-wrap: wrap; margin-bottom: 18px;
}
.avatar {
  width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  background: var(--ink); color: #fff; font-size: 30px; font-weight: 800;
}
.stat-grid { display: flex; gap: 26px; flex-wrap: wrap; }
.stat b { display: block; font-size: 24px; line-height: 1.2; }
.stat span { color: var(--muted); font-size: 13px; }

.medal-big {
  display: flex; gap: 14px; align-items: center; padding: 14px 18px;
  background: linear-gradient(90deg, #fff8e8, #fffdf8);
  border: 1px solid #f0dfb6; border-radius: 14px;
}
.medal-big .ico { font-size: 30px; }
.medal-big b { color: #8a6412; }

/* ---------------------------------------------------- 弹窗 / toast */
.modal-back {
  position: fixed; inset: 0; background: rgba(29,27,23,.45); backdrop-filter: blur(3px);
  display: grid; place-items: center; z-index: 100; padding: 20px;
}
.modal {
  background: var(--bg2); border-radius: 20px; padding: 26px; width: min(520px, 100%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.4); position: relative; max-height: 90vh; overflow: auto;
}
.modal h3 { margin: 0 0 14px; font-size: 20px; }
.modal-x {
  position: absolute; right: 14px; top: 10px; background: none; border: 0; font-size: 26px;
  cursor: pointer; color: var(--muted); line-height: 1;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.quote {
  margin: 0 0 14px; padding: 12px 16px; background: #f6f1e8; border-left: 3px solid var(--a);
  border-radius: 0 12px 12px 0; white-space: pre-wrap; font-size: 15px; max-height: 160px; overflow: auto;
}

.toast {
  position: fixed; left: 50%; bottom: 32px; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px;
  font-weight: 600; z-index: 200; box-shadow: var(--shadow); max-width: 90vw; text-align: center;
}
.toast.bad { background: #b02a1f; }
.toast.good { background: var(--green); }

.ban-banner {
  background: #b02a1f; color: #fff; text-align: center; padding: 10px 16px; font-weight: 700;
}

/* ---------------------------------------------------- 页脚 */
.foot {
  border-top: 1px solid var(--line); padding: 18px clamp(16px,4vw,40px);
  display: flex; gap: 16px; justify-content: space-between; align-items: center;
  color: var(--muted); font-size: 13px; flex-wrap: wrap; background: rgba(255,253,249,.6);
}
.admin-link { font-weight: 700; color: var(--ink); }

/* ---------------------------------------------------- 设置按钮与面板 */
.gear {
  font-size: 17px; line-height: 1; cursor: pointer;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  transition: .15s;
}
.gear:hover { transform: rotate(30deg); box-shadow: var(--shadow); }

.set-block { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 16px; }
.set-block h4 { margin: 0 0 12px; font-size: 16px; }
.set-block .hint { margin: 0 0 12px; }
.set-block .btn.wide { margin-top: 4px; }
.danger-zone {
  background: #fdf3f1; border: 1px solid #f3d3cd; border-radius: 12px;
  padding: 16px; margin-top: 20px;
}
.danger-zone h4 { color: #b02a1f; }

/* ---------------------------------------------------- 注册时的猫狗二选一 */
.species-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.species-card {
  position: relative; cursor: pointer; font: inherit;
  background: #fff; border: 2px solid var(--line); border-radius: 16px;
  padding: 10px 8px 12px; display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: .15s;
}
.species-card:hover { border-color: #d9c9b0; transform: translateY(-2px); }
.species-card.on { border-color: var(--ink); box-shadow: var(--shadow); }
.species-art { display: block; height: 96px; }
.species-art svg { display: block; }
.species-name { font-weight: 800; font-size: 15px; }
.species-tick {
  position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--line); color: #fff; display: grid; place-items: center;
  font-size: 14px; font-weight: 900; transition: .15s;
}
.species-card.on .species-tick { background: var(--green); }

/* ---------------------------------------------------- 宠物页面 */
.pet-stage {
  display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center;
  padding: 24px; margin-bottom: 18px;
}
@media (max-width: 700px) { .pet-stage { grid-template-columns: 1fr; text-align: center; } }
.pet-house {
  background: radial-gradient(circle at 50% 85%, #f3e7d3 0%, #fbf6ee 70%);
  border: 1px solid var(--line); border-radius: 20px; padding: 8px;
  display: grid; place-items: center; position: relative; cursor: pointer;
}
.pet-house::after {
  content: "Click to pet"; position: absolute; bottom: 6px; left: 0; right: 0;
  text-align: center; font-size: 11px; color: var(--muted); letter-spacing: .5px;
}
.pet-svg { display: block; }
.pet-svg.animate .pet-tail { animation: wag 2.6s ease-in-out infinite; }
.pet-svg.animate .pet-eyes { animation: blink 5s infinite; }
@keyframes wag { 0%,100% { transform: rotate(-5deg); } 50% { transform: rotate(9deg); } }
@keyframes blink { 0%,94%,100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
.pet-happy { animation: bounce .6s ease; }
@keyframes bounce { 0%,100% { transform: translateY(0);} 30% { transform: translateY(-14px);} 60% { transform: translateY(-4px);} }

.pet-meta h2 { margin: 0 0 2px; font-size: 26px; }
.pet-lv {
  display: inline-block; background: var(--ink); color: #fff; border-radius: 999px;
  padding: 3px 12px; font-size: 12px; font-weight: 800; letter-spacing: 1px; vertical-align: middle;
}
.pet-lv.hidden-breed { background: linear-gradient(90deg, #d59a26, #e8b94a); }

.stat-rows { display: grid; gap: 10px; margin-top: 14px; }
.stat-row { display: grid; grid-template-columns: 96px 1fr 44px; gap: 10px; align-items: center; font-size: 14px; }
.stat-bar { height: 12px; border-radius: 999px; background: #f0ebe2; overflow: hidden; }
.stat-bar i { display: block; height: 100%; border-radius: 999px; transition: width .5s; }
.bar-hunger i { background: linear-gradient(90deg, #f0a35a, #e8964a); }
.bar-clean i  { background: linear-gradient(90deg, #6fc3e8, #3f8fe0); }
.bar-thirst i { background: linear-gradient(90deg, #8fd9f5, #2aa8d8); }
.bar-mood i   { background: linear-gradient(90deg, #7cd9a4, #2f9e6b); }
.stat-row.low i { background: var(--a) !important; }

.pet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.sick-banner {
  background: #fdf3f1; border: 1px solid #f3d3cd; color: #b02a1f;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 600;
}

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.shop-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow);
}
.shop-item .ico { font-size: 26px; }
.shop-item .nm { font-weight: 800; }
.shop-item .ds { font-size: 12px; color: var(--muted); flex: 1; }
.shop-item .row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font-weight: 800; color: var(--gold); white-space: nowrap; }
.owned-tag { font-size: 12px; color: var(--green); font-weight: 700; }

.dex-level { margin-bottom: 14px; }
.dex-level h4 { margin: 0 0 8px; font-size: 14px; color: var(--muted); letter-spacing: 1px; }
.dex-row { display: flex; flex-wrap: wrap; gap: 8px; }
.dex-chip {
  display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600;
}
.dex-chip.locked { color: var(--muted); background: #f6f1e8; }
.dex-chip.mine { border-color: var(--ink); box-shadow: var(--shadow); }
.dex-chip.hidden-breed { border-color: var(--gold); color: #8a6412; }

/* ---------------------------------------------------- 宠物商店 */
.lv-block { padding: 16px 18px; margin-bottom: 14px; }
.lv-block.locked { opacity: .5; }
.lv-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.lv-head .meta { color: var(--muted); font-size: 13px; }
.lv-head .blind-box { margin-left: auto; }

.breed-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.breed-card {
  border: 2px solid var(--line); border-radius: 14px; padding: 8px 6px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: #fffdf9; transition: .15s; text-align: center;
}
.breed-card.buyable { cursor: pointer; }
.breed-card.buyable:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow); }
.breed-card.mine { border-color: var(--green); background: #f2fbf6; }
.breed-card.rare { border-style: dashed; border-color: var(--gold); background: #fffaf0; }
.breed-art { height: 86px; display: grid; place-items: center; }
.breed-locked { font-size: 40px; font-weight: 900; color: var(--gold); opacity: .55; }
.breed-name { font-weight: 700; font-size: 12.5px; line-height: 1.25; }
.rare-tag { color: #8a6412; font-size: 11px; }

/* ---------------------------------------------------- Google 登录 */
.or-line { display: flex; align-items: center; gap: 10px; margin: 16px 0 12px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.google-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  background: #fff; border: 1px solid var(--line); color: var(--ink);
  font-weight: 700; padding: 11px 18px; border-radius: 999px; transition: .15s;
}
.google-btn:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color: #d9c9b0; }
#googleLink, #googleUnlink { margin-top: 4px; }
.sick-banner.critical { background: #fdeceb; border-color: #e8a9a2; box-shadow: inset 0 0 0 1px #f3d3cd; }

/* ---------------------------------------------------- 通知 / 动物中心 */
.nav-count {
  background: var(--a); color: #fff; font-style: normal; font-size: 10px; font-weight: 800;
  border-radius: 999px; padding: 1px 6px; margin-left: 5px; vertical-align: 2px;
}
.gear { position: relative; }
.gear .nav-count { position: absolute; top: -4px; right: -4px; margin: 0; }
.notif { border-bottom: 1px solid var(--line); padding: 12px 0; }
.notif:last-child { border-bottom: 0; }
.notif.unread { border-left: 3px solid var(--a); padding-left: 10px; margin-left: -13px; }
.notif b { display: block; margin-bottom: 4px; }
.notif p { margin: 0 0 4px; font-size: 14px; color: var(--muted); line-height: 1.5; }

/* ---------------------------------------------------- 宠物派对 */
.nav-count.party-live { background: var(--green); animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.party-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 16px 20px; flex-wrap: wrap;
}
.party-banner.open {
  background: linear-gradient(90deg, #fff6e2, #f2fbf6);
  border-color: var(--gold);
}
.party-count { text-align: right; }
.party-count .clock { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.party-count .lbl { font-size: 12px; color: var(--muted); }
.party-floor {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 12px;
  background:
    radial-gradient(circle at 20% 0%, #ffe9d6 0%, transparent 55%),
    radial-gradient(circle at 80% 100%, #e6efff 0%, transparent 55%),
    #fffdf9;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
}
.guest { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2px; }
.guest b { font-size: 12.5px; }
.guest .meta { font-size: 11px; }

/* ---------------------------------------------------- 照料容量 */
.cov-panel { padding: 14px 18px; margin-bottom: 14px; }
.cov-panel.warn { background: #fffaf0; border-color: var(--gold); }
.cov-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.cov-row { display: grid; grid-template-columns: 150px 1fr 120px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 6px; }
.cov-row .stat-bar i { background: linear-gradient(90deg, #7cd9a4, var(--green)); }
.cov-row.short .stat-bar i { background: var(--gold); }
.cov-label { font-weight: 700; }
.at-risk { font-size: 11px; color: #b02a1f; font-weight: 700; }
@media (max-width: 620px) { .cov-row { grid-template-columns: 1fr; gap: 2px; } }
.swap-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; font-size: 14px;
}
.swap-row:last-child { border-bottom: 0; }
.swap-row.active { color: var(--green); font-weight: 600; }
.guest .btn.sm { margin-top: 4px; font-size: 11px; padding: 3px 9px; }

/* ---------------------------------------------------- 派对聊天 */
.chat-box { padding: 14px 16px; }
.chat-log {
  height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 4px 4px 8px; border-bottom: 1px solid var(--line); margin-bottom: 10px;
}
.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-msg.mine .chat-body { background: #eef4ff; }
.chat-av { flex: 0 0 32px; height: 32px; display: grid; place-items: center; }
.chat-dot { font-size: 18px; }
.chat-body {
  background: #f6f1e8; border-radius: 4px 12px 12px 12px; padding: 6px 12px;
  font-size: 14px; line-height: 1.5; max-width: 100%; word-break: break-word;
}
.chat-body b { margin-right: 6px; font-size: 13px; }
.chat-body i { display: block; font-style: normal; font-size: 11px; opacity: .6; margin-top: 2px; }
.chat-input { display: flex; gap: 8px; }
.chat-input input { flex: 1; }
.chat-input input:disabled { background: #f4efe6; color: var(--muted); }


/* ---------------------------------------------- 口粮储备 */
.stock-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
  gap: 8px; margin: 14px 0 4px;
}
.stock-cell {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 8px 6px; border-radius: 10px;
  background: #faf7f1; border: 1px solid var(--line);
}
.stock-cell .ico { font-size: 17px; line-height: 1.1; }
.stock-cell .nm { font-size: 11px; color: var(--muted); }
.stock-cell b { font-size: 14px; }
.stock-cell .meta { font-size: 10px; }
/* 这只宠物用不上的料淡化，别喧宾夺主 */
.stock-cell.dim { opacity: .42; }
.stock-cell.out { border-color: var(--red); background: #fdf1f0; }
.stock-cell.out b { color: var(--red); }
