@font-face {
  font-family: "KuaiLe";
  src: url("../assets/fonts/kuaile.woff2") format("woff2");
  font-display: swap;
  /* 只接管中文和全角标点，数字字母用系统字体更清楚 */
  unicode-range: U+3000-303F, U+4E00-9FFF, U+FF00-FFEF, U+2026, U+201C-201D, U+00B7;
}

:root {
  color-scheme: light;
  --ink: #5a4a42;
  --ink-soft: #8a776c;
  --bg: #fff4e0;
  --card: #fffdf8;
  --soft: #f6e7d0;
  --peach: #ffb38a;
  --orange: #ff9a6b;
  --pink: #ffadc6;
  --rose: #ff8fab;
  --mint: #8fd9b6;
  --green: #5cb85c;
  --sky: #8ecbf5;
  --blue: #4a9be0;
  --yellow: #ffd76a;
  --lav: #c7b3f5;
  --good: #3aa769;
  --bad: #f0566b;
  --news: #9a5cd6;
  --fun: "KuaiLe", ui-rounded, "Arial Rounded MT Bold", "PingFang SC", "Microsoft YaHei", sans-serif;
  --body: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --line: 3px solid var(--ink);
  --pop: 0 4px 0 var(--ink);
  --sticker: 5px 6px 0 rgba(90, 74, 66, .18);
  font-family: var(--body);
  color: var(--ink);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: var(--bg) url("../assets/pattern.svg") repeat; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.fun, h1, h2, h3, .btn, .hud-name, .stat-top, .kpi b, .title-badge, .rank .val, .rank .no, .tabs button, .side-tabs button, .tag { font-family: var(--fun); font-weight: normal; }
.stat-top > span:last-child, .coin-pill b, .kpi b, .rank .val, .podium .v, .hot, .week-pill { font-weight: 800; }

/* ---------- 图标 ---------- */
.ic { display: inline-block; width: 1.4em; height: 1.4em; vertical-align: -0.35em; flex: none; line-height: 0; }
.ic svg { width: 100%; height: 100%; overflow: visible; }
.ic.sm { width: 1.15em; height: 1.15em; vertical-align: -0.22em; }

.screen { position: fixed; inset: 0; }

/* ---------- 糖果按钮 ---------- */
.btn {
  --c: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: var(--line); background: var(--c); border-radius: 16px; padding: 8px 16px; cursor: pointer;
  white-space: nowrap; font-size: 17px; letter-spacing: .5px; color: var(--ink);
  box-shadow: var(--pop); transition: transform .08s, box-shadow .08s, filter .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn::after {
  content: ""; position: absolute; left: 10px; right: 30%; top: 4px; height: 5px; border-radius: 5px;
  background: rgba(255, 255, 255, .65); pointer-events: none;
}
.btn:hover:not(:disabled) { filter: brightness(1.04); transform: translateY(-1px); box-shadow: 0 5px 0 var(--ink); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { filter: grayscale(.7); opacity: .55; cursor: not-allowed; }
.btn:focus-visible { outline: 3px dashed var(--orange); outline-offset: 3px; }
.btn.primary { --c: var(--orange); color: #fff; text-shadow: 0 2px 0 rgba(90, 74, 66, .35); }
.btn.mint { --c: var(--mint); }
.btn.yellow, .btn.warn { --c: var(--yellow); }
.btn.sky { --c: var(--sky); }
.btn.pink { --c: var(--pink); }
.btn.lav { --c: var(--lav); }
.btn.ghost { --c: #fffdf8; }
.btn.big { width: 100%; padding: 12px; font-size: 22px; margin-top: 12px; border-radius: 20px; }
.btn.icon { width: 44px; height: 44px; padding: 0; border-radius: 14px; }
.btn.icon .ic { width: 26px; height: 26px; }
.btn.small { padding: 4px 10px; font-size: 14px; border-radius: 11px; box-shadow: 0 3px 0 var(--ink); }
.btn.small::after { top: 3px; height: 3px; }

/* ---------- 开始界面 ---------- */
#start {
  display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto;
  background: #bfe6ff url("../assets/bg-start.svg") center bottom / cover no-repeat;
}
.start-card {
  width: 100%; max-width: 440px; background: var(--card); border-radius: 28px; padding: 18px 22px 20px;
  border: var(--line); box-shadow: var(--sticker), 0 4px 0 var(--ink); margin: auto; position: relative;
}
.logo { margin: 0 0 2px; text-align: center; display: flex; justify-content: center; gap: 4px; }
.logo span {
  display: inline-grid; place-items: center; width: 62px; height: 62px; font-family: var(--fun); font-size: 40px;
  border: var(--line); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); color: var(--ink);
  animation: hop 2.4s ease-in-out infinite;
}
.logo span:nth-child(1) { background: var(--peach); transform: rotate(-6deg); animation-delay: 0s; }
.logo span:nth-child(2) { background: var(--yellow); transform: rotate(4deg); animation-delay: .15s; }
.logo span:nth-child(3) { background: var(--mint); transform: rotate(-3deg); animation-delay: .3s; }
.logo span:nth-child(4) { background: var(--sky); transform: rotate(5deg); animation-delay: .45s; }
.logo span:nth-child(5) { background: var(--pink); transform: rotate(-5deg); animation-delay: .6s; }
@keyframes hop { 0%, 60%, 100% { translate: 0 0; } 30% { translate: 0 -7px; } }
.subtitle { text-align: center; color: var(--ink-soft); margin: 10px 0 12px; font-size: 13px; }
.subtitle .tag { display: inline-block; background: var(--soft); padding: 2px 10px; border-radius: 20px; font-size: 14px; }
.field { display: block; font-size: 15px; color: var(--ink); margin: 10px 0 0; font-family: var(--fun); }
.field input, .field select {
  display: block; width: 100%; margin-top: 4px; padding: 9px 12px; border: var(--line);
  border-radius: 14px; background: #fff; color: var(--ink); font-size: 16px; font-family: var(--body);
  box-shadow: inset 0 3px 0 var(--soft);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--orange); }
.seg { display: flex; gap: 6px; margin-top: 4px; }
.seg label { flex: 1; min-width: 0; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: block; text-align: center; padding: 7px 4px; border: var(--line); border-radius: 14px;
  cursor: pointer; font-size: 15px; background: #fff; font-family: var(--fun); box-shadow: 0 3px 0 var(--ink);
  transition: transform .08s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg input:checked + span { background: var(--yellow); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.seg input:focus-visible + span { outline: 3px dashed var(--orange); outline-offset: 2px; }
.hint { font-size: 12px; color: var(--ink-soft); margin: 10px 2px 0; min-height: 16px; background: var(--soft); border-radius: 12px; padding: 6px 10px; }
.avatar-row { display: flex; gap: 14px; align-items: center; }
.grow { flex: 1; min-width: 0; }
.avatar-pick {
  width: 90px; height: 90px; border-radius: 50%; border: var(--line); flex: none; box-shadow: 0 4px 0 var(--ink);
  display: grid; place-items: center; cursor: pointer; overflow: visible; position: relative; background: #fff;
}
.avatar-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-pick .cam {
  position: absolute; right: -6px; bottom: -4px; background: var(--yellow); border: var(--line); border-radius: 50%;
  width: 34px; height: 34px; display: grid; place-items: center; font-family: var(--fun); font-size: 22px; line-height: 1;
}
.row-btns { display: flex; justify-content: center; gap: 10px; margin-top: 12px; }

/* ---------- HUD ---------- */
#game { display: flex; flex-direction: column; }
.hud {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--card);
  border-bottom: var(--line); flex: none; flex-wrap: wrap; position: relative; z-index: 2;
  box-shadow: 0 4px 0 rgba(90, 74, 66, .12);
}
.hud-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hud-avatar { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: var(--line); background: var(--sky); box-shadow: 0 3px 0 var(--ink); }
.hud-name { font-size: 18px; white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
.hud-week { font-size: 12px; color: var(--ink-soft); white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.week-pill { background: var(--lav); border: 2px solid var(--ink); border-radius: 20px; padding: 0 8px; color: var(--ink); font-family: var(--fun); font-size: 13px; }
.ap { display: inline-flex; gap: 3px; }
.ap i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--ink); background: var(--yellow); display: inline-block; }
.ap i.off { background: #eee3d3; }
.hud-stats { display: flex; gap: 10px; flex: 1; flex-wrap: wrap; min-width: 0; }
.stat { min-width: 84px; flex: 1; max-width: 150px; }
.stat-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; gap: 2px; }
.stat-top .ic { width: 20px; height: 20px; }
.bar { height: 12px; background: #f3e6d4; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; margin-top: 2px; }
.bar i {
  display: block; height: 100%; border-right: 2px solid var(--ink); transition: width .5s cubic-bezier(.3, 1.4, .5, 1);
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .28) 0 5px, transparent 5px 10px);
}
.stat.low .stat-top { color: var(--bad); animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .5; } }
.hud-money { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; }
.coin-pill {
  display: inline-flex; align-items: center; gap: 4px; border: 2px solid var(--ink); border-radius: 20px; padding: 1px 10px 1px 4px;
  font-family: var(--fun); font-size: 17px; background: #fff7d6; white-space: nowrap;
}
.coin-pill.debt { background: #ffe3e8; font-size: 13px; color: var(--bad); }
.coin-pill .ic { width: 22px; height: 22px; }
.coin-pill.debt .ic { width: 18px; height: 18px; }
.bump { animation: bump .5s; }
@keyframes bump { 30% { transform: scale(1.25) rotate(-4deg); } }

/* ---------- 地图与侧栏 ---------- */
.stage { flex: 1; display: flex; min-height: 0; }
.map-wrap { position: relative; flex: 1; min-width: 0; overflow: hidden; background: #a8d98a; }
#map { display: block; touch-action: manipulation; }
.tooltip {
  position: fixed; pointer-events: none; background: var(--card); color: var(--ink); padding: 3px 10px;
  border: var(--line); border-radius: 12px; font-size: 15px; z-index: 5; transform: translate(14px, 14px);
  white-space: nowrap; font-family: var(--fun); box-shadow: 0 3px 0 var(--ink);
}
.prompt {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: var(--card);
  border: var(--line); border-radius: 20px; padding: 8px 10px 8px 14px; box-shadow: 0 4px 0 var(--ink), var(--sticker);
  font-family: var(--fun); font-size: 18px; display: flex; gap: 10px; align-items: center; animation: pop .3s cubic-bezier(.2, 1.6, .5, 1);
  max-width: calc(100% - 24px); white-space: nowrap;
}
.prompt .ic { width: 30px; height: 30px; }
@keyframes pop { from { transform: translateX(-50%) scale(.6); opacity: 0; } }
.zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; gap: 8px; }
.toast {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%); pointer-events: none;
  display: flex; flex-direction: column; gap: 6px; align-items: center; width: max-content; max-width: 90%; z-index: 3;
}
.toast div {
  background: var(--card); border: var(--line); padding: 6px 16px; border-radius: 20px; font-size: 15px;
  animation: toast 2.6s forwards; text-align: center; font-family: var(--fun); box-shadow: 0 3px 0 var(--ink);
}
@keyframes toast { 0% { opacity: 0; transform: translateY(-12px) scale(.8); } 10%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }

.side { width: 300px; flex: none; background: var(--card); border-left: var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-tabs { display: flex; gap: 6px; padding: 8px 8px 0; border-bottom: var(--line); background: var(--soft); }
.side-tabs button {
  flex: 1; border: var(--line); border-bottom: 0; background: #f0dcc0; padding: 6px; cursor: pointer; font-size: 16px;
  border-radius: 14px 14px 0 0; display: flex; align-items: center; justify-content: center; gap: 4px; margin-bottom: -3px;
}
.side-tabs button.on { background: var(--card); }
.log { list-style: none; margin: 0; padding: 8px 12px; overflow-y: auto; flex: 1; font-size: 13px; line-height: 1.55; }
.log li { padding: 6px 0 6px 16px; border-bottom: 2px dotted var(--soft); position: relative; }
.log li::before { content: ""; position: absolute; left: 0; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--soft); border: 2px solid var(--ink); }
.log li .w { font-family: var(--fun); color: var(--ink-soft); font-size: 12px; margin-right: 4px; }
.log li.good::before { background: var(--mint); } .log li.good { color: #2f8a57; }
.log li.bad::before { background: var(--rose); } .log li.bad { color: #d6455a; }
.log li.news::before { background: var(--lav); } .log li.news { color: var(--news); }
.log li.sys::before { background: var(--sky); } .log li.sys { color: #2f7cc0; }

.toolbar {
  display: flex; gap: 8px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--card);
  border-top: var(--line); justify-content: center; flex: none; overflow-x: auto; position: relative; z-index: 2;
}
.toolbar .btn { flex-direction: column; gap: 0; padding: 4px 12px 3px; font-size: 14px; border-radius: 16px; min-width: 64px; }
.toolbar .btn .ic { width: 30px; height: 30px; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; background: rgba(90, 74, 66, .45); display: flex; align-items: center;
  justify-content: center; padding: 16px; z-index: 10; animation: fade .15s;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  background: var(--card); border-radius: 26px; width: 100%; max-width: 520px; max-height: 100%;
  overflow-y: auto; padding: 22px 20px 20px; position: relative; border: var(--line);
  box-shadow: 0 5px 0 var(--ink), var(--sticker); animation: rise .3s cubic-bezier(.2, 1.5, .5, 1);
}
.modal-card.wide { max-width: 720px; }
@keyframes rise { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.modal-x { position: absolute; z-index: 2; right: 12px; top: 12px; }
.modal h2 { margin: 0 0 6px; font-size: 26px; text-align: center; }
.modal h3 { margin: 16px 0 8px; font-size: 18px; display: flex; align-items: center; gap: 6px; }
.modal .desc { color: var(--ink-soft); font-size: 13px; margin: 0 0 12px; text-align: center; line-height: 1.6; }
.modal .story { font-size: 16px; line-height: 1.75; margin: 10px 0 12px; background: var(--soft); border-radius: 16px; padding: 12px 14px; }
.hero { display: grid; place-items: center; margin: -4px 0 6px; }
.hero .ic { width: 78px; height: 78px; animation: bounce 1.8s ease-in-out infinite; filter: drop-shadow(0 4px 0 rgba(90, 74, 66, .15)); }
@keyframes bounce { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-6px) rotate(3deg); } }
.banner {
  margin: -22px -20px 14px; padding: 18px 20px 12px; border-bottom: var(--line); border-radius: 23px 23px 0 0;
  background: var(--c, var(--yellow)); text-align: center;
}
.banner h2 { margin: 2px 0 0; }
.banner .desc { margin: 4px 0 0; color: var(--ink); opacity: .8; }

.actions { display: grid; gap: 10px; }
.act { justify-content: flex-start; gap: 12px; text-align: left; width: 100%; padding: 10px 14px; font-size: 18px; }
.act .lbl { flex: 1; min-width: 0; }
.act .tip { display: block; font-size: 12px; color: var(--ink-soft); font-family: var(--body); margin-top: 2px; white-space: normal; }
.act .why { color: var(--bad); }
.act .cost { font-size: 13px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 12px; padding: 1px 8px; display: inline-flex; align-items: center; gap: 2px; }
.act .cost.free { background: var(--mint); }

.deltas { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; justify-content: center; }
.chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 10px 2px 5px; border-radius: 20px; font-size: 15px; border: 2px solid var(--ink); font-family: var(--fun); background: #fff; animation: chipIn .4s backwards; }
.chip .ic { width: 20px; height: 20px; }
.chip.up { background: #dcf5e7; }
.chip.down { background: #ffe1e6; }
.chip:nth-child(2) { animation-delay: .06s; } .chip:nth-child(3) { animation-delay: .12s; } .chip:nth-child(4) { animation-delay: .18s; } .chip:nth-child(5) { animation-delay: .24s; }
@keyframes chipIn { from { transform: scale(.4); opacity: 0; } }

.choices { display: grid; gap: 10px; margin-top: 12px; }
.choices .btn { justify-content: space-between; text-align: left; white-space: normal; }
.choices .pct { color: var(--ink-soft); font-size: 13px; font-family: var(--body); background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 0 6px; white-space: nowrap; }

table.t { width: 100%; border-collapse: separate; border-spacing: 0 6px; font-size: 14px; }
table.t th { padding: 2px 6px; font-size: 13px; color: var(--ink-soft); text-align: left; font-family: var(--fun); font-weight: normal; }
table.t td { padding: 8px 6px; background: #fff; border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); }
table.t td:first-child { border-left: 2px solid var(--ink); border-radius: 14px 0 0 14px; }
table.t td:last-child { border-right: 2px solid var(--ink); border-radius: 0 14px 14px 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }
.good-cell { display: flex; align-items: center; gap: 8px; }
.good-cell .ic { width: 36px; height: 36px; }
.good-cell small { display: block; color: var(--ink-soft); font-size: 11px; }
.up-t { color: var(--good); } .down-t { color: var(--bad); }
.hot { color: #e8590c; font-family: var(--fun); font-size: 16px; }
.trade-btns { display: flex; gap: 5px; justify-content: flex-end; flex-wrap: wrap; }
.money-line {
  display: flex; justify-content: space-around; align-items: center; background: #fff7d6; border: 2px solid var(--ink);
  border-radius: 16px; padding: 6px 10px; margin: 8px 0; flex-wrap: wrap; gap: 6px; font-family: var(--fun); font-size: 16px;
}
.money-line span { display: inline-flex; align-items: center; gap: 4px; }
.newsbox {
  display: flex; gap: 8px; align-items: flex-start; background: #f2eaff; border: 2px solid var(--ink); border-radius: 14px;
  padding: 8px 12px; font-size: 13px; margin: 8px 0; line-height: 1.5;
}
.newsbox .ic { width: 24px; height: 24px; }
.newsbox.bad { background: #ffe1e6; }

.summary { list-style: none; padding: 0; margin: 0; }
.summary li { margin: 6px 0; line-height: 1.55; padding: 8px 12px; border-radius: 14px; background: var(--soft); font-size: 14px; }
.summary .good { background: #dcf5e7; } .summary .bad { background: #ffe1e6; } .summary .news { background: #f2eaff; }

/* 结局成绩单 */
.report {
  background: #fff url("../assets/pattern.svg"); border: var(--line); border-radius: 22px; padding: 18px 16px 14px;
  position: relative; box-shadow: inset 0 0 0 6px #fff, inset 0 0 0 8px var(--soft);
}
.result-head { text-align: center; }
.result-head img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: var(--line); background: var(--sky); box-shadow: 0 4px 0 var(--ink); }
.title-badge {
  display: inline-block; margin: 10px 0 4px; padding: 6px 22px; border-radius: 30px; font-size: 26px;
  background: var(--yellow); border: var(--line); box-shadow: 0 4px 0 var(--ink); animation: bounce 2s infinite;
}
.stamp {
  position: absolute; right: 14px; top: 14px; width: 86px; height: 86px; border: 3px solid var(--bad); border-radius: 50%;
  color: var(--bad); font-family: var(--fun); display: grid; place-items: center; text-align: center; font-size: 13px;
  line-height: 1.25; transform: rotate(14deg); opacity: .75; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--bad);
}
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.kpi { background: #fff; border: var(--line); border-radius: 16px; padding: 8px; text-align: center; box-shadow: 0 3px 0 var(--ink); }
.kpi b { display: block; font-size: 24px; }
.kpi span { font-size: 12px; color: var(--ink-soft); }
.kpi:nth-child(1) { background: #fff1e6; } .kpi:nth-child(2) { background: #eef0ff; } .kpi:nth-child(3) { background: #e8f8ef; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 3px; background: #fff; border: 2px solid var(--ink); color: var(--ink); border-radius: 12px; padding: 2px 9px 2px 4px; font-size: 13px; font-family: var(--fun); }
.badge .ic { width: 18px; height: 18px; }

/* 排行榜 */
.tabs { display: flex; gap: 6px; margin: 8px 0; flex-wrap: wrap; justify-content: center; }
.tabs button { border: var(--line); background: #fff; border-radius: 20px; padding: 3px 14px; cursor: pointer; font-size: 16px; box-shadow: 0 3px 0 var(--ink); }
.tabs button.on { background: var(--yellow); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.podium { display: flex; justify-content: center; align-items: flex-end; gap: 8px; margin: 18px 0 6px; }
.podium .p { text-align: center; width: 110px; min-width: 0; }
.podium .p img { width: 56px; height: 56px; border-radius: 50%; border: var(--line); object-fit: cover; background: var(--sky); }
.podium .p.first img { width: 72px; height: 72px; }
.podium .p .crown { display: block; width: 34px; height: 34px; margin: 0 auto -8px; position: relative; z-index: 1; }
.podium .p b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-radius: 8px; }
.podium .p .v { font-family: var(--fun); color: var(--orange); font-size: 17px; }
.podium .stand { border: var(--line); border-radius: 12px 12px 0 0; font-family: var(--fun); font-size: 24px; margin-top: 4px; display: grid; place-items: center; }
.podium .first .stand { height: 70px; background: var(--yellow); }
.podium .second .stand { height: 50px; background: #dfe7ef; }
.podium .third .stand { height: 36px; background: #f2cfb6; }
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; margin: 6px 0; background: #fff; border: 2px solid var(--ink); border-radius: 16px; }
.rank .no { width: 28px; text-align: center; color: var(--ink-soft); font-size: 18px; }
.rank img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: var(--sky); border: 2px solid var(--ink); flex: none; }
.rank .who { flex: 1; min-width: 0; }
.rank .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank .who span { font-size: 12px; color: var(--ink-soft); }
.rank .val { font-size: 19px; color: var(--orange); white-space: nowrap; }
.rank li.me, .podium .p.me b { background: #fff1e6; }
.empty { text-align: center; color: var(--ink-soft); padding: 24px 0; }
.empty .ic { width: 70px; height: 70px; display: block; margin: 0 auto 8px; }

.places-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.places-grid .btn { justify-content: flex-start; font-size: 15px; }
.places-grid .btn .ic { width: 26px; height: 26px; }
.help ul { padding: 0; list-style: none; }
.help li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.65; font-size: 14px; margin: 8px 0; background: var(--soft); padding: 8px 12px; border-radius: 14px; }
.help li .ic { width: 30px; height: 30px; }

/* ---------- 窄屏 ---------- */
@media (max-width: 760px) {
  .side { display: none; }
  .hud { gap: 6px 10px; padding: 6px 10px; }
  .hud-stats { order: 3; flex-basis: 100%; gap: 6px; }
  .stat { min-width: 0; }
  .stat-top { font-size: 12px; }
  .stat-top .ic { width: 16px; height: 16px; }
  .hud-money { margin-left: auto; }
  .toolbar { justify-content: flex-start; gap: 6px; }
  .toolbar .btn { min-width: 58px; padding: 3px 8px; font-size: 13px; }
  .logo span { width: 54px; height: 54px; font-size: 34px; }
  .kpis { gap: 6px; }
  .kpi b { font-size: 18px; }
  .stamp { width: 66px; height: 66px; font-size: 11px; }
}
@media (min-width: 761px) { .only-mobile { display: none !important; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.btn.peach { --c: var(--peach); }
table.t th { white-space: nowrap; }
@media (max-width: 760px) {
  .good-cell small { display: none; }
  .good-cell .ic { width: 28px; height: 28px; }
  table.t td { padding: 6px 4px; }
}

/* 瓦香鸡庆祝 */
.waxiang { position: relative; text-align: center; }
.waxiang .hero.big .ic { width: 120px; height: 120px; animation: jiggle .6s ease-in-out infinite alternate; }
@keyframes jiggle { from { transform: rotate(-8deg) scale(1); } to { transform: rotate(8deg) scale(1.08); } }
.waxiang-title { font-size: 34px !important; color: #e8590c; text-shadow: 0 3px 0 var(--yellow); animation: hop 1s infinite; }
.confetti { position: absolute; inset: -20px; pointer-events: none; overflow: hidden; }
.confetti i {
  position: absolute; top: -10px; left: calc(var(--i) * 5.6%); width: 10px; height: 14px; border: 2px solid var(--ink); border-radius: 3px;
  background: hsl(calc(var(--i) * 47), 85%, 72%); animation: fall 2.4s calc(var(--i) * -0.13s) linear infinite;
}
@keyframes fall { to { transform: translateY(560px) rotate(540deg); } }
