/* 小红点（dot.ts）和七天签到日历（login-gift.ts），2026-11-03。base.css 开头引了本文件。颜色、字体用各游戏都有的 --ink、--font。 */
.cg-dot-host { position: relative; }
.cg-dot { position: absolute; top: -6px; right: -6px; z-index: 2; min-width: 14px; height: 14px; padding: 0 4px; display: inline-flex; align-items: center; justify-content: center; font: 700 11px/1 var(--font); color: #fff; background: #e5322d; border: 2px solid #fff; border-radius: 9px; box-shadow: 0 0 0 1.5px var(--ink); pointer-events: none; }
.cg-dot:not(:empty) { min-width: 20px; height: 20px; top: -8px; right: -8px; }

.cg-login { position: absolute; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 16px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 16px; background: #fff; border: 2px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); font-family: var(--font); color: var(--ink); text-align: center; }
.cg-login-head { display: flex; flex-direction: column; gap: 2px; }
.cg-login-head b { font-size: 24px; }
.cg-login-head span { font-size: 14px; opacity: .8; }
.cg-login-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cg-login-cell { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 92px; padding: 6px 4px; background: #f6f1e6; border: 2px solid var(--ink); border-radius: 12px; }
.cg-login-cell.is-big { grid-column: span 1; background: #ffe7a6; }
.cg-login-cell.is-today { background: #ffd23f; box-shadow: 0 3px 0 var(--ink); transform: translateY(-2px); }
.cg-login-cell.is-next { border-style: dashed; background: #e9f6ff; }
.cg-login-cell.is-done { opacity: .55; }
.cg-login-day { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.cg-login-cell.is-today .cg-login-day, .cg-login-cell.is-next .cg-login-day { color: #c0261f; }
.cg-login-what { font-size: 14px; line-height: 1.15; }
.cg-login-tick { position: absolute; top: 4px; right: 6px; font-style: normal; font-weight: 800; color: #1f9e5a; }
.cg-login-cell canvas { max-height: 46px; width: auto; }
.cg-login-got { font-size: 18px; font-weight: 800; color: #1f9e5a; }
.cg-login-tmr { font-size: 15px; font-weight: 700; }
.cg-login .cg-btns { justify-content: center; }
@media (max-height: 460px) {
  .cg-login { gap: 6px; padding: 10px; }
  .cg-login-grid { grid-template-columns: repeat(7, 1fr); gap: 5px; }
  .cg-login-cell { min-height: 74px; }
  .cg-login-head b { font-size: 19px; }
}
@font-face { font-family: Fredoka; src: url(fonts/fredoka-latin.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }
:root { --ink: #eef2f7; --dim: #9aa6b5; --panel: #1b222ccc; --accent: #ffc23d; }
#brand { line-height: 0; }
.re-wordmark { width: min(290px, 70vw); height: auto; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; background: #11161d; color: var(--ink); font: 15px/1.35 system-ui, "Segoe UI", Roboto, Arial, sans-serif; overflow: hidden; overscroll-behavior: none; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; -webkit-touch-callout: none; }
/* 安全区：全屏的手机 App 里别被刘海和圆角盖住。#safe 是给画布上的战线条量位置用的 */
#safe { position: fixed; left: env(safe-area-inset-left, 0px); right: env(safe-area-inset-right, 0px); top: env(safe-area-inset-top, 0px); bottom: env(safe-area-inset-bottom, 0px); pointer-events: none; visibility: hidden; }
#adWait { position: fixed; inset: 0; z-index: 9; display: flex; align-items: center; justify-content: center; background: #0007; font-size: 18px; font-weight: 700; }
canvas#map { position: fixed; inset: 0; width: 100%; height: 100%; touch-action: none; display: block; }

#hud { position: fixed; inset: env(safe-area-inset-top, 0px) env(safe-area-inset-right, 0px) env(safe-area-inset-bottom, 0px) env(safe-area-inset-left, 0px); pointer-events: none; }
#phase { position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: min(320px, 40vw); text-align: center; background: var(--panel); border-radius: 8px; padding: 4px 10px 6px; }
#phaseText { font-weight: 700; letter-spacing: .04em; font-size: 14px; white-space: nowrap; }
#phaseBar { height: 5px; background: #ffffff22; border-radius: 3px; margin-top: 3px; overflow: hidden; }
#phaseBar i { display: block; height: 100%; width: 100%; background: var(--accent); }
#phase.dusk #phaseBar i { background: #ff8a3d; }
#phase.night #phaseBar i { background: #ff4d5e; }

#board { position: absolute; top: 8px; right: 8px; margin: 0; padding: 5px 8px; list-style: none; background: var(--panel); border-radius: 8px; font-size: 12px; min-width: 132px; }
#board li { display: flex; align-items: center; gap: 5px; padding: 1px 0; white-space: nowrap; }
#board li.me { font-weight: 700; }
#board li.out { opacity: .4; }
#board i { width: 9px; height: 9px; border-radius: 2px; flex: none; }
#board span { flex: 1; max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
#board em { font-style: normal; font-variant-numeric: tabular-nums; }

#me { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 6px; }
.stat { background: var(--panel); border-radius: 8px; padding: 4px 11px; text-align: center; min-width: 66px; }
.stat b { display: block; font-size: 21px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat small { color: var(--dim); font-size: 12px; }
.stat.alarm { background: #c8322b; animation: stat-alarm .6s ease-in-out infinite alternate; }
.stat.alarm small { color: #fff; }
/* 幸存者是分数：金边、数字金色，一眼看出比的是它 */
.stat.score { box-shadow: inset 0 0 0 2px #ffc94d; }
.stat.score b { color: #ffd76a; }
.stat.score small { color: #ffe7a8; }
/* 排行榜表头：说清这一列比的是什么 */
#board::before { content: "Survivors · most wins"; display: block; font-size: 12px; font-weight: 700; color: #ffd76a; padding-bottom: 2px; margin-bottom: 2px; border-bottom: 1px solid #ffffff22; white-space: nowrap; }
@keyframes stat-alarm { to { transform: scale(1.14); } }

#skill { position: absolute; right: 8px; bottom: 8px; pointer-events: auto; min-width: 128px; padding: 7px 14px; border: 0; border-radius: 10px; background: var(--accent); color: #2a1c00; cursor: pointer; font: inherit; }
#skill b { display: block; font-size: 17px; }
#skill span { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; }
#skill small { display: block; font-size: 12px; opacity: .85; }
#skill.cool { background: #4b5563; color: #d7dde5; cursor: default; }
#skill.on { background: #6ee7a8; color: #05371f; }

#ratio { position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); display: flex; gap: 3px; padding: 4px; background: var(--panel); border-radius: 10px; pointer-events: auto; }
#ratio button { min-width: 50px; min-height: 40px; padding: 2px 8px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer; touch-action: manipulation; }
#ratio button[aria-pressed="true"] { background: var(--accent); color: #2a1c00; }
@media (max-width: 620px) {
  #ratio { bottom: 92px; }
  #hud #stance { bottom: 136px; } #hud #stance button { min-height: 30px; padding: 0 6px; font-size: 12px; }
  #skill { min-width: 0; max-width: 170px; padding: 6px 8px; }
  #skill span { white-space: normal; }
  .stat { padding: 4px 6px; min-width: 56px; }
}

#banner { position: absolute; top: 58px; left: 50%; transform: translateX(-50%); font-size: 20px; font-weight: 800; text-align: center; color: #fff; text-shadow: 0 2px 6px #000c; opacity: 0; transition: opacity .25s; width: max-content; max-width: calc(100vw - 32px); }
#banner.show { opacity: 1; }
#net { position: absolute; top: 58px; left: 8px; background: #b91c1c; padding: 3px 10px; border-radius: 6px; font-size: 13px; }

.panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 16px); overflow: auto; padding: 18px 22px; background: #1b222cf2; border-radius: 14px; text-align: center; box-shadow: 0 10px 40px #0009; }
.panel.small { width: min(360px, calc(100vw - 32px)); top: auto; bottom: 74px; transform: translateX(-50%); padding: 12px 16px; }
.panel h1 { margin: 0; font-size: 34px; letter-spacing: .01em; }
.panel h2 { margin: 0 0 4px; font-size: 22px; }
.sub { margin: 5px 0 12px; color: var(--dim); }
.fine { margin: 10px 0 0; color: var(--dim); font-size: 12px; }
.count { font-size: 48px; font-weight: 800; margin: 2px 0; font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 8px; justify-content: center; }


#modes { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 10px 0 12px; }
#modes button { padding: 6px 10px; border: 1px solid #475364; border-radius: 8px; background: transparent; color: var(--ink); font-size: 13px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
#modes button[aria-pressed="true"] { border-color: var(--accent); background: #ffc23d2e; color: var(--accent); }
/* 难度：只有 Quick 能选（Standard 跟段位走） */
#diffs { display: flex; gap: 4px; justify-content: center; margin: -4px 0 12px; }
#diffs[hidden] { display: none; }
/* 模式、难度收进这一个键，点开才露 */
#optBtn { display: block; margin: 8px auto 10px; padding: 4px 12px; border: 1px solid #475364; border-radius: 999px; background: transparent; color: var(--dim); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
#optBtn[aria-expanded="true"] { color: var(--ink); border-color: var(--accent); }
#opts[hidden] { display: none; }
#diffs button { padding: 4px 12px; border: 1px solid #475364; border-radius: 8px; background: transparent; color: var(--dim); font-size: 12px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
#diffs button[aria-pressed="true"] { border-color: #7fd0ff; background: #7fd0ff26; color: #bfe8ff; }
#diffs #autoCmd { margin-left: 8px; }
#diffs #autoCmd[aria-pressed="true"] { border-color: #8be37a; background: #8be37a26; color: #c9f5bf; }
/* 指挥官模式（试验）：比例键上面一排方针键 */
#stance { position: absolute; left: 50%; bottom: 62px; transform: translateX(-50%); display: flex; gap: 3px; padding: 4px; background: var(--panel); border-radius: 10px; pointer-events: auto; white-space: nowrap; }
#stance[hidden] { display: none; }
#stance button { min-height: 34px; padding: 2px 9px; border: 0; border-radius: 7px; background: transparent; color: var(--ink); font-weight: 700; font-size: 13px; cursor: pointer; touch-action: manipulation; }
#stance button[aria-pressed="true"] { background: #8be37a; color: #12300c; }
#stance #aimBtn { color: #ffd76a; }
button.big.alt { background: #3fb4ff; color: #03253d; }
#goal { margin-top: 3px; font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; }
#talk { position: absolute; left: 8px; bottom: 76px; display: flex; align-items: center; gap: 8px; max-width: min(380px, 62vw); padding: 6px 12px 6px 6px; background: #1b222cee; border-radius: 34px 12px 12px 34px; }
#talk img { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #f5e9d0; }
#talk p { margin: 0; font-size: 13px; line-height: 1.25; }
#talk b { display: block; font-size: 12px; color: var(--accent); letter-spacing: .04em; }
#story { position: fixed; inset: 0; z-index: 3; background: #0b0f14; cursor: pointer; }
#storyImg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
#storyBox { position: absolute; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(720px, calc(100vw - 24px)); padding: 10px 16px; background: #10151cec; border-radius: 12px; text-align: left; }
#storyBox b { color: var(--accent); font-size: 14px; }
#storyBox p { margin: 2px 0 2px; font-size: 18px; line-height: 1.3; }
#storyBox small { color: var(--dim); font-size: 12px; }
#storySkip { position: absolute; top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(8px + env(safe-area-inset-right, 0px)); background: var(--panel); }
button { font: inherit; }
.panel h3 { margin: 12px 0 6px; font-size: 16px; }
.panel.wide { width: min(720px, calc(100vw - 24px)); }
#chips { display: flex; justify-content: center; gap: 8px; margin: 0 0 10px; font-size: 13px; font-weight: 700; }
#chips span { padding: 3px 10px; border-radius: 99px; background: #ffffff14; }
#supChip { color: var(--accent); }
.row.nav { margin-top: 6px; }
.row.nav button { padding: 7px 12px; font-size: 14px; }
#cmds { display: flex; justify-content: center; gap: 8px; margin: 0 0 8px; flex-wrap: wrap; }
.cmd { position: relative; display: flex; flex-direction: column; align-items: center; width: 66px; padding: 4px 2px; border: 2px solid #3a4553; border-radius: 10px; background: #232c38; color: inherit; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.cmd img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #f5e9d0; }
.cmd.sel { border-color: var(--accent); background: #2f3540; }
.cmd.locked { opacity: .45; }
.mini { padding: 6px 10px; border: 0; border-radius: 8px; background: var(--accent); color: #2a1c00; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; touch-action: manipulation; }
.mini:disabled { background: #3a4553; color: #93a0af; cursor: default; }
#nodes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.node { display: flex; flex-direction: column; align-items: center; gap: 1px; min-height: 76px; padding: 6px 4px; border: 2px solid #3a4553; border-radius: 10px; background: #232c38; color: inherit; font-size: 12px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.node b { font-size: 20px; }
.node i { font-style: normal; color: var(--accent); letter-spacing: 1px; }
.node.done { background: #2e4a35; border-color: #5cc46f; }
.node.next { border-color: var(--accent); }
.node:disabled { opacity: .45; cursor: default; }
#campArt { display: block; width: 100%; height: auto; max-height: 26vh; object-fit: cover; border-radius: 10px; margin: 6px 0; }
.rowcard { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; margin-bottom: 6px; border-radius: 9px; background: #232c38; text-align: left; }
.rowcard b { font-size: 15px; } .rowcard em { font-style: normal; color: var(--accent); font-size: 12px; font-weight: 700; }
.rowcard span { display: block; color: #cfd7e1; font-size: 12px; }
#skins { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 6px; }
.skin { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 6px 8px; border: 2px solid #3a4553; border-radius: 9px; background: #232c38; color: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-align: left; }
.skin i { width: 14px; height: 14px; border-radius: 3px; } .skin small { width: 100%; color: var(--accent); font-size: 12px; }
.skin.on { border-color: var(--accent); } .skin:disabled { opacity: .5; cursor: default; }
#heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; }
.hero { display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border: 2px solid #3a4553; border-radius: 10px; background: #232c38; text-align: left; cursor: pointer; }
.hero.sel { border-color: var(--accent); background: #2f3540; } .hero.locked { cursor: default; }
.hero.locked img { filter: grayscale(1); opacity: .6; }
.hero .hd { display: flex; align-items: center; gap: 8px; }
.hero .hd img { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #f5e9d0; }
.hero b { font-size: 16px; } .hero em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent); }
.hero .hd small { display: block; color: var(--dim); font-size: 12px; }
.hero p { margin: 0; font-size: 12.5px; color: #d6dde6; }
.hero p i { display: block; font-style: normal; font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--dim); }
.hero .lock { color: var(--accent); font-weight: 700; }
#gears { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 6px; }
.gear { padding: 6px 8px; border: 2px solid #3a4553; border-radius: 9px; background: #232c38; color: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.gear em { font-style: normal; margin-left: 5px; font-size: 12px; color: var(--dim); } .gear span { display: block; color: #cfd7e1; }
.gear.r1 em { color: #6fb6ff; } .gear.r2 em { color: #d38bff; } .gear.on { border-color: var(--accent); }
#tasks { list-style: none; margin: 8px 0 12px; padding: 0; text-align: left; }
#tasks li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; margin-bottom: 6px; border-radius: 9px; background: #232c38; font-size: 14px; }
#tasks small { display: block; color: var(--dim); font-size: 12px; }
#tasks b { color: #6ee7a8; font-size: 13px; }
#giftHost { position: fixed; inset: 0; z-index: 6; background: #0009; }
.cg-login { --ink: #1b222c; --font: inherit; color: #1b222c; }
.cg-login .cg-btn { min-height: 42px; padding: 0 22px; border: 2px solid #1b222c; border-radius: 10px; background: var(--accent); color: #2a1c00; font-size: 16px; font-weight: 800; cursor: pointer; }
.cg-login .cg-btns { display: flex; gap: 8px; }
#boons { position: fixed; left: 50%; top: 20%; transform: translateX(-50%); z-index: 4; width: min(640px, calc(100vw - 16px)); padding: 10px 12px; border-radius: 14px; background: #10151cf2; text-align: center; }
#boons h3 { margin: 0 0 6px; font-size: 16px; }
#boonCards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
#boonCards button { min-height: 92px; padding: 8px 6px; border: 2px solid var(--accent); border-radius: 10px; background: #232c38; color: inherit; cursor: pointer; touch-action: manipulation; }
#boonCards b { display: block; font-size: 15px; color: var(--accent); }
#boonCards span { display: block; margin-top: 3px; font-size: 12.5px; }
#boonCards em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; color: var(--dim); }
#boonBar { height: 4px; margin-top: 7px; border-radius: 3px; background: #ffffff22; overflow: hidden; }
#boonBar i { display: block; height: 100%; width: 100%; background: var(--accent); }
#boss { margin: 3px -10px -6px; padding: 2px 10px 5px; border-radius: 0 0 8px 8px; background: #2a0d3ce6; text-align: center; font-size: 12px; font-weight: 800; }
/* 目标行、血条都在 #phase 里往下长，横幅要跟着让开 */
#hud.lvl #banner { top: 68px; }
#hud.bossy #banner { top: 96px; }
#boss div { height: 7px; margin-top: 2px; border-radius: 4px; background: #ffffff22; overflow: hidden; }
#boss i { display: block; height: 100%; width: 100%; background: #d93cff; }
@media (min-width: 900px) { #talk { left: 236px; } }
#campaign { white-space: nowrap; }
#stars { margin: 0 0 4px; font-size: 24px; letter-spacing: 3px; color: var(--accent); }
#reward { margin: 0 0 6px; font-weight: 800; color: #6ee7a8; }
#rankLine { margin: 0 0 8px; }
#shareRow { margin-top: 8px; } #shareRow button { padding: 6px 12px; font-size: 13px; }
#tomorrow { margin-top: 8px; color: var(--accent); font-weight: 700; }
button.big { min-width: 180px; padding: 11px 26px; border: 0; border-radius: 11px; background: var(--accent); color: #2a1c00; font-size: 19px; font-weight: 800; cursor: pointer; }
#watch { padding: 9px 14px; border: 1px solid #475364; border-radius: 10px; background: transparent; color: inherit; cursor: pointer; }
.panel.small button.big { min-width: 0; font-size: 16px; padding: 9px 16px; }
.snd { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); z-index: 5; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 9px; background: var(--panel); font-size: 18px; line-height: 1; cursor: pointer; touch-action: manipulation; }
#music { left: calc(8px + env(safe-area-inset-left, 0px)); }
#mute { left: calc(50px + env(safe-area-inset-left, 0px)); }
.snd.off { opacity: .6; }
/* 音符没有「关」的字符，关着时画一道红斜线 */
#music.off::after { content: ""; position: absolute; left: 7px; right: 7px; top: 50%; height: 3px; border-radius: 2px; background: #ff4d5e; transform: rotate(-45deg); }
#home { position: fixed; top: calc(52px + env(safe-area-inset-top, 0px)); left: calc(8px + env(safe-area-inset-left, 0px)); z-index: 2; width: 38px; height: 38px; border: 0; border-radius: 9px; background: var(--panel); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; touch-action: manipulation; }
#skipTut { position: fixed; top: calc(8px + env(safe-area-inset-top, 0px)); right: calc(8px + env(safe-area-inset-right, 0px)); z-index: 2; padding: 8px 16px; background: var(--panel); }
body.tut #board, body.tut #ratio, body.tut #skill, body.tut #me .stat:last-child { display: none; }
#relit { position: fixed; left: 50%; top: 9%; transform: translateX(-50%); text-align: center; pointer-events: none; color: #fff; text-shadow: 0 2px 8px #0009; }
#relit span { display: block; font-size: 18px; font-weight: 700; }
#relit b { display: block; font-size: 62px; line-height: 1.05; font-weight: 900; font-variant-numeric: tabular-nums; }
#relit small { font-size: 16px; font-weight: 700; }
.row.wrap { flex-wrap: wrap; align-items: center; }
button.plain { padding: 10px 16px; border: 1px solid #475364; border-radius: 10px; background: transparent; color: inherit; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.note { margin: 0 0 10px; color: var(--accent); font-weight: 700; }
#partyLink { margin: 8px 0 4px; }
#linkBox { flex: 1; min-width: 0; padding: 9px 10px; border: 1px solid #475364; border-radius: 10px; background: #11161d; color: var(--ink); font: inherit; font-size: 13px; user-select: text; -webkit-user-select: text; }

#rank { list-style: none; margin: 0 0 12px; padding: 0; text-align: left; }
#rank li { display: grid; grid-template-columns: 22px 12px 1fr auto auto; gap: 7px; align-items: center; padding: 3px 6px; border-radius: 6px; font-size: 14px; font-variant-numeric: tabular-nums; }
#rank li.me { background: #ffffff18; font-weight: 700; }
#rank i { width: 12px; height: 12px; border-radius: 3px; }
#rank small { color: var(--dim); font-size: 12px; }
#rank li > span:nth-child(3) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-height: 460px) {
  #board { font-size: 12px; min-width: 104px; padding: 3px 6px; }
  .stat { padding: 2px 8px; min-width: 52px; } .stat b { font-size: 16px; } .stat small { font-size: 12px; }
  #skill { min-width: 104px; padding: 4px 10px; } #skill b { font-size: 14px; }
  #banner { font-size: 15px; top: 44px; }
  #hud.lvl #banner { top: 60px; } #hud.bossy #banner { top: 88px; }
  #ratio button { min-width: 42px; min-height: 34px; padding: 0 5px; font-size: 13px; }
  .panel { padding: 10px 14px; } .panel h1 { font-size: 24px; } .sub { margin: 2px 0 6px; font-size: 13px; }
  #skill span { font-size: 12px; } #skill small { font-size: 12px; }
  button.big { padding: 7px 20px; font-size: 16px; } .fine { margin-top: 4px; font-size: 12px; }
  #rank li { padding: 0 6px; font-size: 12px; } .count { font-size: 30px; }
  .re-wordmark { width: 140px; }
  #modes { margin: 5px 0 6px; } #modes button { padding: 3px 8px; font-size: 12px; }
  #talk { bottom: 56px; } #talk img { width: 38px; height: 38px; } #talk p { font-size: 12px; }
  #storyBox p { font-size: 15px; }
}
@media (max-height: 400px) {
  #menu .sub { display: none; }
  .re-wordmark { width: 104px; }
}
@media (max-width: 620px) {
  .row button.big { flex: 1 1 130px; min-width: 0; padding-left: 12px; padding-right: 12px; }
  #campaign { flex: 1 1 160px; padding-left: 6px; padding-right: 6px; font-size: 15px; }
  #play { flex: 1 1 90px; }
}
@media (max-height: 680px) and (max-aspect-ratio: 1/1) {
  #menu .sub { display: none; }
}
/* 横屏窄框：面板让开左上角两个声音键 */
@media (max-width: 860px) and (min-aspect-ratio: 1/1) {
  .panel:not(.small) { left: calc(50% + 46px); width: min(720px, calc(100vw - 108px)); }
  #menu, #daily, #waiting, #result { width: min(560px, calc(100vw - 108px)); }
}
/* 竖屏：开局放大地图，界面压在地图上 */
@media (max-aspect-ratio: 1/1) {
  #phase { left: 96px; right: 8px; width: auto; transform: none; }
  #board { top: 62px; font-size: 12px; min-width: 112px; }
  .panel:not(.small) { top: calc(50% + 24px); max-height: calc(100vh - 72px); }
  #menu .re-wordmark { width: 150px; }
  #banner, #hud.lvl #banner, #hud.bossy #banner { top: 26%; width: calc(100vw - 16px); font-size: 17px; }
  #hud.bossy #board { top: 92px; }
  #talk { bottom: 150px; }
  #storyImg { object-fit: contain; }
}
