:root {
  --bg: #07090d;
  --panel: rgba(14, 18, 26, 0.78);
  --panel-solid: #0e121a;
  --line: rgba(160, 200, 255, 0.14);
  --line-2: rgba(160, 200, 255, 0.28);
  --text: #e8eef7;
  --dim: #8d99ab;
  --dimmer: #5b6677;
  --cyan: #3df0ff;
  --cyan-2: #0fb7d4;
  --orange: #ff7a2f;
  --red: #ff3b5c;
  --gold: #ffd166;
  --ok: #5dff9d;
  --font: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --mono: "Chakra Petch", "Noto Sans SC", monospace;
  --cut: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
  --cut-s: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); overflow: hidden; user-select: none; }
body.playing { cursor: none; }
button { font-family: inherit; color: inherit; cursor: pointer; }
.hidden { display: none !important; }

#gl { position: fixed; inset: 0; width: 100vw; height: 100vh; display: block; }
#vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 58%, rgba(10,14,20,0.42) 100%); }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }

/* 自身回溯时的整屏效果：青色色偏 + 扫描线 */
#fx-rewind { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .12s;
  background:
    repeating-linear-gradient(0deg, rgba(61,240,255,0.07) 0 2px, transparent 2px 5px),
    radial-gradient(ellipse at center, rgba(61,240,255,0.0) 40%, rgba(20,180,220,0.35) 100%);
  mix-blend-mode: screen; }
#fx-rewind.on { opacity: 1; }
#fx-hit { position: fixed; inset: 0; pointer-events: none; opacity: 0; background: radial-gradient(ellipse at center, transparent 35%, rgba(255,40,70,0.55) 100%); transition: opacity .5s; }
#fx-hit.on { opacity: 1; transition: none; }

/* ------------------------------------------------ 菜单 */
.screen { position: fixed; inset: 0; }
#menu { display: grid; grid-template-columns: minmax(360px, 430px) 1fr; gap: 28px; padding: 40px 48px 96px;
  background: linear-gradient(90deg, rgba(7,9,13,0.94) 0%, rgba(7,9,13,0.72) 38%, rgba(7,9,13,0.45) 62%, rgba(7,9,13,0.8) 100%); }
.menu-left, .menu-right { display: flex; flex-direction: column; gap: 22px; min-height: 0; }
.menu-left > :not(:last-child) { flex: none; }   /* 窗口矮的时候只让地图列表变短（它自己能滚动），上面两块不被压扁 */
.menu-right { justify-content: flex-start; padding-top: 8px; }

.logo { padding: 6px 0 4px; }
.kicker { font-family: var(--mono); letter-spacing: .32em; font-size: 12px; color: var(--cyan); opacity: .85; }
.title { position: relative; margin: 8px 0 18px; font-family: var(--font); font-size: 126px; font-weight: 900; letter-spacing: .02em; line-height: 1;   /* 11-30 改名「逆刃」：Noto Sans SC 900，斜切 9° */
  width: max-content; transform: skewX(-9deg); transform-origin: left bottom;
  background: linear-gradient(180deg, #ffffff 0%, #c9d6e8 70%, #8fa1ba 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.title::before, .title::after { content: attr(data-text); white-space: pre-line; position: absolute; left: 0; top: 0; -webkit-background-clip: initial; background: none; pointer-events: none; }
.title::before { color: var(--cyan); opacity: .55; transform: translate(-5px, 0); filter: blur(.4px); mix-blend-mode: screen; animation: ghost 4.2s infinite; z-index: -1; }
.title::after { color: var(--orange); opacity: .35; transform: translate(4px, 1px); mix-blend-mode: screen; z-index: -1; animation: ghost2 4.2s infinite; }
@keyframes ghost { 0%, 82%, 100% { transform: translate(-5px,0); opacity: .5 } 86% { transform: translate(-22px,0); opacity: .8 } 90% { transform: translate(-10px,2px); opacity: .3 } }
@keyframes ghost2 { 0%, 82%, 100% { transform: translate(4px,1px) } 86% { transform: translate(12px,-1px) } }
.subtitle { color: var(--dim); letter-spacing: .14em; font-size: 15px; font-weight: 500; }
.subtitle span { color: var(--cyan); }

.block { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.block-h { font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: .08em; display: flex; align-items: center; gap: 10px; }
.block-h .idx { font-family: var(--mono); font-size: 11px; color: var(--bg); background: var(--cyan); padding: 1px 6px; clip-path: var(--cut-s); }
.block-h .hint { font-weight: 400; color: var(--dim); font-size: 12px; letter-spacing: .02em; }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { background: var(--panel); border: 1px solid var(--line); padding: 12px 14px; text-align: left; clip-path: var(--cut-s); transition: all .15s; }
.seg button b { display: block; font-size: 18px; }
.seg button small { font-family: var(--mono); color: var(--dim); letter-spacing: .12em; font-size: 11px; }
.seg button:hover { border-color: var(--line-2); }
.seg button.on { background: linear-gradient(135deg, rgba(61,240,255,0.22), rgba(61,240,255,0.05)); border-color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(61,240,255,.35); }
/* 上场 / 观战：小一号的第二排 */
.seg-sm button { padding: 8px 14px; display: flex; align-items: baseline; gap: 10px; }
.seg-sm button b { display: inline; font-size: 15px; }
.seg-sm button small { font-size: 10px; }
.seg-sm button.on { background: linear-gradient(135deg, rgba(255,209,102,0.2), rgba(255,209,102,0.04)); border-color: var(--gold); box-shadow: inset 0 0 0 1px rgba(255,209,102,.3); }
.seg-sm button[data-watch="1"].on { background: linear-gradient(135deg, rgba(61,240,255,0.22), rgba(61,240,255,0.05)); border-color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(61,240,255,.35); }
/* 观战时：形象那一格换成观战按键 */
.watch-keys { display: none; flex-direction: column; gap: 8px; font-size: 13px; color: var(--dim); padding: 4px 0 2px; max-width: 640px; }
.watch-keys span { display: flex; align-items: center; gap: 6px; }
.watch-keys kbd { margin-right: 2px; }
#menu.watch .skins { display: none; }
#menu.watch .watch-keys { display: flex; }
#menu.watch .card.on .pick { background: var(--cyan); }

.maps { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; overflow: auto; padding-right: 4px; }
.map { background: var(--panel); border: 1px solid var(--line); padding: 8px; display: flex; gap: 10px; align-items: center; clip-path: var(--cut-s); transition: all .15s; text-align: left; }
.map canvas { width: 64px; height: 42px; image-rendering: pixelated; flex: none; border-radius: 2px; }
.map b { font-size: 14px; display: block; }
.map small { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: .08em; }
.map:hover { border-color: var(--line-2); }
.map.on { border-color: var(--cyan); background: linear-gradient(135deg, rgba(61,240,255,0.18), rgba(61,240,255,0.03)); }
.map.random canvas { display: none; }
.map.random .dice { width: 64px; height: 42px; display: grid; place-items: center; font-size: 22px; color: var(--cyan); border: 1px dashed var(--line-2); flex: none; }

.cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; height: min(46vh, 440px); background: linear-gradient(180deg, rgba(20,26,38,.85), rgba(10,13,19,.92)); border: 1px solid var(--line);
  clip-path: var(--cut); overflow: hidden; transition: transform .18s, border-color .18s, box-shadow .18s; text-align: left; padding: 0; }
.card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, var(--c, #fff) 0%, transparent 62%); opacity: .18; transition: opacity .2s; }
/* 立绘 384×576，上下各有 4.7% 的透明边。高度这样算，人物头顶总在卡片上边往下 12 像素，鼠标悬停放大 3% 也不出框
   （原来是 92%：卡片矮于约 725 像素时头顶出框。用户 11-29 提） */
.card img { position: absolute; left: 50%; bottom: 58px; height: calc((100% - 70px) / 0.953); transform: translateX(-50%); filter: drop-shadow(0 10px 18px rgba(0,0,0,.6)); transition: transform .25s; pointer-events: none; }
.card .meta { position: absolute; left: 0; right: 0; bottom: 0; padding: 10px 12px 12px; background: linear-gradient(0deg, rgba(7,9,13,.96) 40%, rgba(7,9,13,0)); }
.card .co { font-family: var(--mono); font-size: 10px; letter-spacing: .18em; color: var(--dim); }
.card .nm { font-size: 17px; font-weight: 900; letter-spacing: .02em; }
.card .bar { position: absolute; left: 0; top: 0; width: 100%; height: 3px; background: var(--c); opacity: .7; }
.card .pick { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: 11px; padding: 2px 8px; background: var(--c); color: #000; font-weight: 700; letter-spacing: .1em; opacity: 0; transform: translateY(-4px); transition: all .15s; clip-path: var(--cut-s); }
.card:hover { transform: translateY(-4px); border-color: var(--line-2); }
.card:hover img { transform: translateX(-50%) scale(1.03); }
.card.on { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), 0 12px 40px -12px var(--c); }
.card.on::before { opacity: .42; }
.card.on .pick { opacity: 1; transform: none; }

.row-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.skin-block { min-width: 0; }
.skins { display: flex; gap: 5px; align-items: flex-end; flex-wrap: wrap; }
.skin { width: 60px; height: 84px; padding: 0; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(20,26,38,.75), rgba(10,13,19,.92)); clip-path: var(--cut-s); overflow: hidden; position: relative; transition: transform .15s, border-color .15s; }
.skin::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 75%, var(--c) 0%, transparent 66%); opacity: .22; transition: opacity .15s; }
.skin img { position: absolute; left: 50%; bottom: 15px; height: 64px; transform: translateX(-50%); pointer-events: none; }
.skin span { position: absolute; left: 0; right: 0; bottom: 2px; font: 600 10px/1.2 var(--mono); color: var(--dim); letter-spacing: .08em; }
.skin.own { width: 76px; height: 104px; }
.skin.own img { height: 82px; }
.skin.own span { font-size: 11px; color: var(--text); }
.skin.on { border-color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold); }
.skin.on::before { opacity: .45; }
.skin.on span { color: var(--gold); }
.skin:hover { transform: translateY(-2px); }
.skins .sep { align-self: stretch; display: flex; align-items: center; padding: 0 3px 0 7px; margin-left: 4px; border-left: 1px solid var(--line-2); }
.skins .sep span { writing-mode: vertical-rl; font-size: 10px; color: var(--dimmer); letter-spacing: .25em; }

.btn-start { position: relative; min-width: 260px; height: 84px; border: 0; background: linear-gradient(120deg, var(--cyan) 0%, #7ff7ff 50%, var(--cyan) 100%); background-size: 200% 100%;
  color: #031015; clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); font-weight: 900; display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: background-position .4s, transform .12s; box-shadow: 0 0 40px rgba(61,240,255,.35); }
.btn-start span { font-size: 30px; letter-spacing: .5em; margin-right: -.5em; }
.btn-start small { font-family: var(--mono); font-size: 11px; letter-spacing: .3em; opacity: .7; }
.btn-start:hover { background-position: 100% 0; transform: translateY(-2px); }
.btn-start:disabled { filter: grayscale(1) brightness(.6); cursor: not-allowed; }

.keys-strip { position: fixed; left: 0; right: 0; bottom: 0; height: 52px; display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap;
  background: linear-gradient(0deg, rgba(7,9,13,.95), rgba(7,9,13,.6)); border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }
.keys-strip span { display: flex; align-items: center; gap: 5px; }
.keys-strip a { color: var(--cyan); text-decoration: none; border-bottom: 1px dashed var(--cyan); }
kbd { font-family: var(--mono); font-size: 11px; color: var(--text); background: rgba(255,255,255,.06); border: 1px solid var(--line-2); border-bottom-width: 2px; padding: 1px 6px; border-radius: 3px; min-width: 20px; text-align: center; }
kbd.mouse { width: 14px; height: 20px; padding: 0; border-radius: 7px; position: relative; display: inline-block; min-width: 0; }
kbd.mouse::after { content: ""; position: absolute; top: 2px; width: 5px; height: 7px; background: var(--cyan); border-radius: 3px 0 0 0; }
kbd.mouse.l::after { left: 1px; }
kbd.mouse.r::after { right: 1px; border-radius: 0 3px 0 0; }
.credit { position: fixed; right: 18px; bottom: 60px; font-size: 11px; color: var(--dimmer); }

/* ------------------------------------------------ 弹窗 */
.modal { display: grid; place-items: center; background: rgba(4,6,9,.62); backdrop-filter: blur(6px); z-index: 20; }
.panel { background: var(--panel-solid); border: 1px solid var(--line-2); clip-path: var(--cut); padding: 28px 34px; max-width: 760px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.panel h2 { margin: 0 0 14px; font-size: 22px; letter-spacing: .1em; }
.panel ul { margin: 0 0 18px; padding-left: 18px; line-height: 1.75; font-size: 14px; color: #cfd8e5; }
.panel ul b { color: var(--cyan); }
.panel.small { min-width: 320px; display: flex; flex-direction: column; gap: 10px; }
.btn { border: 1px solid var(--cyan); background: rgba(61,240,255,.15); padding: 10px 22px; font-size: 15px; font-weight: 700; clip-path: var(--cut-s); letter-spacing: .06em; transition: all .15s; }
.btn small { font-family: var(--mono); font-size: 10px; opacity: .6; margin-left: 6px; }
.btn:hover { background: rgba(61,240,255,.3); }
.btn.ghost { border-color: var(--line-2); background: transparent; }
.btn.ghost:hover { background: rgba(255,255,255,.06); }
.btn.wide { width: 100%; }
/* 音效开关、音量（菜单底栏、暂停面板） */
.keys-strip a.sound-link.off { color: var(--dim); border-bottom-color: var(--dim); }
/* 主菜单底栏的音量滑条（用户 11-29 要）：和暂停面板里的联动；关着时滑条变淡，拖动会自动打开 */
.keys-strip .vol-ctl { display: inline-flex; align-items: center; gap: 6px; }
.keys-strip .mini-vol { width: 76px; accent-color: var(--cyan); cursor: pointer; }
.keys-strip a.sound-link.off + .mini-vol { opacity: .45; }
/* 加了音量滑条后底栏变长：窗口窄时缩小间距和滑条，保证一行排得下；再窄就往上长出第二行，不掉到窗口外面 */
@media (max-width: 1440px) { .keys-strip { gap: 12px; } .keys-strip .mini-vol { width: 56px; } }
@media (max-width: 1200px) { .keys-strip { height: auto; min-height: 52px; row-gap: 4px; padding-top: 6px; padding-bottom: 6px; } }
.sound-row { display: flex; align-items: center; gap: 14px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.sound-row .btn { padding: 7px 14px; font-size: 13px; white-space: nowrap; }
.sound-row .btn.off { color: var(--dim); }
.sound-row label { flex: 1; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); }
.sound-row input[type=range] { flex: 1; accent-color: var(--cyan); }
.sound-row.tight { margin-top: 0; padding-top: 0; border-top: 0; }
.np-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--dim); min-height: 30px; }
.np-row span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-row .btn { padding: 5px 12px; font-size: 12px; white-space: nowrap; flex: none; }
.now-playing { position: fixed; left: 48px; bottom: 60px; font-size: 11px; color: var(--dimmer); letter-spacing: .04em; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-playing:empty { display: none; }

.loader { display: flex; flex-direction: column; align-items: center; gap: 18px; color: var(--dim); font-size: 14px; letter-spacing: .1em; }
.loader .ring { width: 56px; height: 56px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--cyan); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------ 对战信息栏（照 B 站版成片 hud.py：米白长条、圆头像、菱形飞刀、小药丸冷却条、橙色提示） */
#hud { position: fixed; inset: 0; pointer-events: none; --ink: #2e2824; --sub: #80766c; --cream: rgba(255,252,246,.95); --pill: rgba(255,252,246,.92); color: var(--ink); }
.topbar { position: absolute; top: 12px; left: 20px; right: 20px; height: 68px; display: flex; align-items: center; justify-content: space-around; padding: 0 14px;
  background: var(--cream); border-radius: 22px; box-shadow: 0 6px 24px rgba(16,20,26,.3); }
.slot { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; transition: opacity .3s; }
.slot .av { position: relative; width: 50px; height: 50px; border-radius: 50%; flex: none; background: #fff; box-shadow: 0 0 0 4px var(--c); }
.slot .av img { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); border-radius: 50%; object-fit: cover; background: #faf6ee; }
.slot .av em { position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font: 700 9px/1 var(--mono); letter-spacing: .12em; color: #5a3d00; background: var(--c); padding: 2px 5px 1px; border-radius: 6px; font-style: normal; }
.slot .nm { font-size: 20px; font-weight: 900; line-height: 1.05; white-space: nowrap; }
.slot .nm small { font-size: 11px; font-weight: 500; color: var(--sub); margin-left: 6px; letter-spacing: .04em; }
.slot .st { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--sub); font-weight: 500; margin-top: 3px; white-space: nowrap; }
.slot .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); display: inline-block; }
.slot .kn { display: inline-flex; gap: 4px; margin-left: 3px; }
.slot .kn i { width: 9px; height: 13px; background: var(--c); clip-path: polygon(50% 0, 100% 42%, 50% 100%, 0 42%); display: inline-block; }
.slot .kn i.off { background: color-mix(in srgb, var(--c) 26%, #ebe5dd); }
.slot .out { display: none; }
.slot.dead .av { box-shadow: 0 0 0 4px #c9c3bc; }
.slot.dead .av img { filter: grayscale(1); opacity: .7; }
.slot.dead .nm { color: #aaa197; text-decoration: line-through; text-decoration-thickness: 2px; }
.slot.dead .dot, .slot.dead .sc, .slot.dead .kn { display: none; }
.slot.dead .out { display: inline-block; background: #ece6e0; color: #968c82; padding: 1px 8px; border-radius: 8px; }
.cdpill { position: absolute; top: calc(100% + 16px); left: -8px; display: flex; align-items: center; gap: 6px; padding: 3px 11px; background: var(--pill); border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--sub); box-shadow: 0 3px 12px rgba(16,20,26,.22); white-space: nowrap; transition: opacity .2s; }
.cdpill .l.ready { color: var(--ink); }
.cdpill .bar { width: 46px; height: 6px; border-radius: 3px; background: #e2dbd2; position: relative; overflow: hidden; }
.cdpill .bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 100%; background: var(--c); border-radius: 3px; }
.cdpill .amp { display: none; font-style: normal; background: #ffc84a; color: #603c00; padding: 0 7px; border-radius: 6px; }
.cdpill .amp.on { display: inline-block; }
.cdpill .eye { display: none; color: #aaa197; font-weight: 500; }
.cdpill.blind .l, .cdpill.blind .bar, .cdpill.blind .amp { display: none; }
.cdpill.blind .eye { display: inline; }
.slot.dead .cdpill { display: none; }

.clock-wrap { text-align: center; min-width: 116px; }
.clock { font-size: 34px; font-weight: 900; line-height: 1; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.clock.low { color: #e0443a; }
.mode { font-size: 12px; color: var(--sub); margin-top: 4px; font-weight: 500; letter-spacing: .12em; }

.note-pill { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 9px; padding: 6px 18px 6px 12px; background: var(--pill); border-radius: 999px;
  font-size: 15px; font-weight: 700; box-shadow: 0 4px 16px rgba(16,20,26,.26); white-space: nowrap; }
.note-pill:empty { display: none; }
.note-pill.warn { top: 100px; color: #d4561c; }
.note-pill.warn::before { content: "!"; width: 18px; height: 16px; background: #e8622a; color: #fff; clip-path: polygon(50% 0, 100% 100%, 0 100%); font: 900 11px/19px var(--font); text-align: center; }
.note-pill.soft { top: 62%; color: var(--ink); font-weight: 500; padding: 6px 18px; }

.feed { position: absolute; top: 132px; right: 24px; display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.feed .item { display: flex; align-items: center; gap: 8px; padding: 5px 14px; background: var(--pill); border-radius: 999px; font-size: 13px; box-shadow: 0 3px 12px rgba(16,20,26,.22); animation: feedIn .25s ease-out; }
.feed .item b { color: var(--c); font-weight: 900; }
.feed .item .how { font-size: 11px; padding: 1px 8px; background: #f3e9db; color: #8a5a1c; border-radius: 7px; font-weight: 700; }
.feed .item .how.amp { background: #ffe9a8; color: #7a5200; }
.feed .item .pts { color: #c98a00; font-weight: 900; }
.feed .item.out { opacity: 0; transition: opacity .6s; }
@keyframes feedIn { from { transform: translateX(30px); opacity: 0 } to { transform: none; opacity: 1 } }

.banner { position: absolute; top: 30%; left: 50%; padding: 6px 46px 12px; background: var(--cream); border-radius: 28px; font-size: 62px; font-weight: 900; letter-spacing: .14em;
  opacity: 0; transform: translateX(-50%); box-shadow: 0 10px 34px rgba(16,20,26,.32); white-space: nowrap; }
.banner::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: -4px; height: 7px; border-radius: 4px; background: var(--bc, #3df0ff); }
.banner.show { animation: bannerIn 1s ease-out forwards; }
@keyframes bannerIn { 0% { opacity: 0; transform: translateX(-50%) scale(1.3) } 18% { opacity: 1; transform: translateX(-50%) scale(1) } 75% { opacity: 1 } 100% { opacity: 0; transform: translateX(-50%) scale(.97) } }

.hud-bottom { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dock { display: flex; align-items: center; gap: 14px; padding: 9px 14px; background: var(--cream); border-radius: 24px; box-shadow: 0 8px 28px rgba(16,20,26,.3); }
.knives { display: flex; gap: 7px; padding: 0 14px 0 6px; border-right: 1px solid #e6dfd5; }
.knife { width: 18px; height: 30px; clip-path: polygon(50% 0, 100% 42%, 50% 100%, 0 42%); background: #e4ddd3; transition: background .15s; }
.knife.hand { background: linear-gradient(180deg, #ffd166, #f0a400); }
.knife.out, .knife.back { background: #8fd7e2; }
.knife.ground { background: #cdbca8; }
.knife.prime { background: #3df0ff; animation: blink .25s infinite alternate; }
@keyframes blink { to { opacity: .35 } }
.skills { display: flex; gap: 8px; }
.skill { position: relative; width: 66px; height: 66px; background: #f3eee7; border-radius: 17px; border: 2px solid transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; overflow: hidden; transition: border-color .12s, background .12s; }
.skill .cd { position: absolute; inset: 0; background: conic-gradient(rgba(46,40,36,.30) var(--p, 0%), transparent 0); }
.skill .nm { position: relative; font-size: 14px; font-weight: 900; }
.skill .key { position: relative; font: 700 10px/1.5 var(--font); color: var(--sub); background: #fff; padding: 0 6px; border-radius: 6px; }
.skill .sec { position: absolute; top: 3px; right: 7px; font-size: 11px; font-weight: 900; }
.skill.ready { border-color: #f0a400; background: #fff7e2; }
.skill.flash { animation: flash .4s; }
@keyframes flash { 0% { background: #ffd98a; transform: scale(1.08) } 100% { background: #fff7e2; transform: none } }
.skill.locked .nm { color: #b9b0a6; }
.skill.deny { animation: deny .34s; }
@keyframes deny { 0% { transform: none; border-color: #e5505d } 20% { transform: translateX(-4px); border-color: #e5505d } 45% { transform: translateX(4px); border-color: #e5505d }
  70% { transform: translateX(-2px); border-color: #e5505d } 100% { transform: none } }
.dock.off { display: none; }
#hud.spec .skill .key { display: none; }
/* 观战：长条上的编号、正在看的那位、底下的切换条 */
.slot .av .num { position: absolute; left: -8px; top: -8px; width: 21px; height: 21px; border-radius: 50%; background: #2e2824; color: #fffcf6;
  font: 700 12px/21px var(--mono); text-align: center; box-shadow: 0 0 0 2px var(--cream); }
.slot.view .av { box-shadow: 0 0 0 4px var(--c), 0 0 0 7px #2e2824; }
.slot.view .av .num { background: var(--cyan-2); }
.spec-bar { pointer-events: auto; display: flex; align-items: center; gap: 4px; padding: 6px 8px; background: var(--cream); border-radius: 18px; box-shadow: 0 8px 28px rgba(16,20,26,.3); }
.spec-bar .lbl { font: 700 11px/1 var(--mono); letter-spacing: .2em; color: var(--sub); padding: 0 6px 0 8px; }
.spec-bar .lbl.tip { font: 500 11px/1 var(--font); letter-spacing: .04em; color: #a49a90; padding: 0 8px 0 2px; white-space: nowrap; }
.spec-bar button { display: flex; align-items: center; gap: 7px; border: 0; background: transparent; padding: 5px 12px 5px 7px; border-radius: 12px; font: 700 14px/1 var(--font); color: var(--ink); transition: background .12s, opacity .2s; }
.spec-bar button kbd { color: var(--ink); background: #fff; border-color: #d9d0c4; }
.spec-bar button img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: #faf6ee; box-shadow: 0 0 0 2px var(--c); }
.spec-bar button:hover { background: rgba(46,40,36,.07); }
.spec-bar button.on { background: #2e2824; color: #fffcf6; }
.spec-bar button.on kbd { background: #4a423c; color: #fffcf6; border-color: #6a625c; }
.spec-bar button.dead { opacity: .38; }
.spec-bar button.dead img { filter: grayscale(1); }
.spec-bar button.ff.on { background: #ffc84a; color: #603c00; }
.spec-bar button.ff.on kbd { background: #fff3cf; color: #603c00; border-color: #e0b44a; }
.spec-bar .sep { width: 1px; height: 24px; background: #e6dfd5; margin: 0 3px; }
body.playing.watching { cursor: auto; }
body.playing.watching #cursor { display: none; }
.amp-bar { width: 380px; height: 10px; background: rgba(255,252,246,.7); border-radius: 5px; position: relative; box-shadow: 0 3px 12px rgba(16,20,26,.25); }
.amp-bar .fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--p, 100%); border-radius: 5px; background: linear-gradient(90deg, #ffc84a, #ff8ad8); }
.amp-bar span { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: #7a5200; background: var(--pill); padding: 1px 10px; border-radius: 8px; white-space: nowrap; }

/* 名牌（随人物投影） */
.tag3d { position: absolute; transform: translate(-50%, -100%); font-size: 12px; font-weight: 700; white-space: nowrap; text-shadow: 0 1px 3px #000, 0 0 6px #000; letter-spacing: .04em; transition: opacity .2s; }
.tag3d.me { color: var(--gold); }
.tag3d .st { display: block; text-align: center; font-size: 10px; font-weight: 500; color: var(--dim); }
.pop { position: absolute; transform: translate(-50%, -50%); font-weight: 900; font-size: 18px; white-space: nowrap; text-shadow: 0 2px 6px #000; animation: pop 1.3s ease-out forwards; }
.pop small { display: block; text-align: center; font-size: 12px; font-weight: 700; color: #ffd9a8; }
@keyframes pop { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6) } 15% { opacity: 1; transform: translate(-50%, -60%) scale(1.15) } 30% { transform: translate(-50%, -70%) scale(1) } 100% { opacity: 0; transform: translate(-50%, -150%) } }

/* 准星 */
#cursor { position: fixed; left: 0; top: 0; width: 30px; height: 30px; margin: -15px 0 0 -15px; pointer-events: none; z-index: 30; display: none; }
#cursor::before, #cursor::after { content: ""; position: absolute; background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
#cursor::before { left: 14px; top: 0; width: 2px; height: 30px; clip-path: polygon(0 0, 100% 0, 100% 35%, 0 35%, 0 65%, 100% 65%, 100% 100%, 0 100%); }
#cursor::after { top: 14px; left: 0; height: 2px; width: 30px; clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%); }
body.playing #cursor { display: block; }

/* ------------------------------------------------ 回放（11-30 加）：列表弹窗、播放条 */
.keys-strip #btn-replays b { font: 700 11px var(--mono); color: var(--gold); }
.panel.replays { width: min(1180px, 94vw); max-width: none; display: flex; flex-direction: column; gap: 14px; max-height: 88vh; }
.rp-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.rp-head h2 { margin: 0; }
.rp-head span { font-size: 13px; color: var(--dim); }
.rp-list { overflow: auto; min-height: 120px; border: 1px solid var(--line); background: rgba(255,255,255,.02); }
.rp-list table { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-list th { position: sticky; top: 0; background: var(--panel-solid); text-align: left; font-weight: 500; color: var(--dim); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.rp-list td { padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rp-list td.who { white-space: normal; min-width: 180px; }
.rp-list tr.unfinished td { color: var(--dim); }
.rp-list td.ops { text-align: right; }
.rp-list td.ops .btn { padding: 5px 14px; font-size: 12px; margin-left: 6px; }
.rp-empty { padding: 36px 20px; text-align: center; color: var(--dim); font-size: 14px; }
.rp-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.rp-actions label.btn { cursor: pointer; }
.rp-actions .btn:disabled { opacity: .4; cursor: not-allowed; }
.rp-note { margin: 0; font-size: 12px; line-height: 1.75; color: var(--dim); }
.rp-note code { font-family: var(--mono); color: #cfd8e5; background: rgba(255,255,255,.06); padding: 0 5px; border-radius: 3px; }
/* 回放存进浏览器本地（11-30 加）：列表下面一行写存了几局 / 存不了的原因；存不进本地的那局标"未存本地"；删除要点两下 */
.rp-store { margin-top: -6px; font-size: 12px; color: var(--dim); }
.rp-store.off, .rp-store.full { color: #ffb86b; }
.rp-mem { margin-left: 8px; padding: 1px 6px; border: 1px solid rgba(255,184,107,.45); border-radius: 3px; color: #ffb86b; font-size: 11px; }
.rp-list td.ops .btn.rp-del { min-width: 80px; }                     /* 和"确认删除"一样宽，点第一下时这一行的按钮不挪位置 */
.rp-list td.ops .btn.rp-del.armed { border-color: #ff3b5c; color: #ff6b81; background: rgba(255,59,92,.12); }
.rp-list th { z-index: 2; }                                           /* 列表长了往下滚时，表头盖住按钮（按钮自己有层级） */
.pb-bar { pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 7px 12px; background: var(--cream); border-radius: 18px; box-shadow: 0 8px 28px rgba(16,20,26,.3); color: var(--ink); }
.pb-tag { font: 700 11px/1 var(--mono); letter-spacing: .2em; color: #fffcf6; background: #e0443a; padding: 4px 7px 3px; border-radius: 6px; }
.pb-title { font-size: 13px; font-weight: 700; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.pb-btn { border: 0; background: #2e2824; color: #fffcf6; border-radius: 10px; padding: 6px 12px; font: 700 13px/1 var(--font); min-width: 38px; }
.pb-btn.wide { background: transparent; color: var(--ink); border: 1px solid #d9d0c4; }
.pb-btn.wide kbd { color: var(--ink); background: #fff; border-color: #d9d0c4; }
#pb-seek { width: min(420px, 30vw); accent-color: #e0443a; }
.pb-time { font: 700 13px/1 var(--mono); font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
.pb-speed { display: flex; gap: 2px; }
.pb-speed button { border: 0; background: transparent; color: var(--sub); font: 700 12px/1 var(--mono); padding: 6px 7px; border-radius: 8px; }
.pb-speed button.on { background: #2e2824; color: #fffcf6; }
body.replaying .dock { opacity: .96; }

/* ------------------------------------------------ 胜利收尾（11-30 加）：镜头拉近、胜者跳舞时，底下的飞刀 / 技能 / 观战切换条 / 过载条收起来，
   提示挪到画面底下（不挡胜者），鼠标换回普通指针（点一下直接看结算）；回放的播放条照常留着 */
body.victory .dock, body.victory #spec-bar, body.victory #amp-bar, body.victory #amp-note { display: none; }
body.victory #center-note { top: auto; bottom: 84px; }
body.playing.victory { cursor: pointer; }
body.playing.victory #cursor { display: none; }

/* ------------------------------------------------ 结算（米白面板，和信息栏同一套） */
#result .panel.result { min-width: 940px; max-width: 1100px; text-align: center; background: rgba(255,252,246,.97); color: #2e2824; border: 0; border-radius: 28px; clip-path: none; box-shadow: 0 30px 90px rgba(0,0,0,.45); }
.result-head { display: flex; align-items: center; justify-content: center; gap: 20px; margin-bottom: 16px; }
.result-head img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: #faf6ee; box-shadow: 0 0 0 4px #fff, 0 0 0 9px #c9c3bc; }
.result-head img.win { box-shadow: 0 0 0 4px #fff, 0 0 0 9px #f0a400; }
.result-head > div { text-align: left; }
.result-title { font-size: 58px; font-weight: 900; letter-spacing: .22em; line-height: 1.05; }
.result-title.win { color: #2e2824; }
.result-title.lose { color: #8a8076; }
.result-sub { color: #80766c; margin-top: 4px; font-size: 14px; }
.score-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 22px; }
.score-table th { white-space: nowrap; font-size: 11px; color: #80766c; font-weight: 500; letter-spacing: .08em; padding: 6px 8px; border-bottom: 1px solid #e6dfd5; }
.score-table td { padding: 8px; border-bottom: 1px solid #f0ebe4; font-weight: 700; font-variant-numeric: tabular-nums; }
.score-table td.who { white-space: nowrap; min-width: 220px; text-align: left; display: flex; align-items: center; gap: 12px; font-weight: 900; }
.score-table td.who small { font-weight: 500; color: #80766c; margin-left: 6px; font-size: 12px; }
.score-table td.who img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #faf6ee; box-shadow: 0 0 0 3px var(--c); }
.score-table tr.me td { background: rgba(240,164,0,.1); }
.score-table td.total { font-size: 20px; font-weight: 900; color: #c98a00; }
.result-btns { display: flex; gap: 12px; justify-content: center; }
#result .btn { border: 2px solid #2e2824; background: #2e2824; color: #fffcf6; border-radius: 14px; clip-path: none; }
#result .btn:hover { background: #4a423c; }
#result .btn.ghost { background: transparent; color: #2e2824; }
#result .btn.ghost:hover { background: rgba(46,40,36,.06); }

/* ------------------------------------------------ 再来一局累计比分（11-30 加）：顶栏得分旁的"· 累计 N"（第 2 局起），结算表最后两列"累计总分""胜场" */
.slot .cum { margin-left: -2px; font-weight: 700; color: #a0783a; }
.slot.dead .cum { display: none; }
.score-table th.cum { color: #7a5200; font-weight: 700; background: rgba(240,164,0,.1); }
.score-table td.cum { background: rgba(240,164,0,.07); }
.score-table .cum.first { border-left: 2px solid #eadfcd; }
.score-table td.cum.total { color: #2e2824; }

@media (max-width: 1280px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .card { height: 30vh; }
  .title { font-size: 87px; }
}

/* ------------------------------------------------ 隐藏补丁版（11-30 加，hidden_ui.js）：logo 下面的选项、补丁版标识 */
.hv-box { flex: none; }
.hv-offer { position: relative; display: flex; flex-direction: column; gap: 5px; width: 100%; text-align: left; padding: 12px 16px 13px;
  border: 1px solid #ff5fd2; background: linear-gradient(120deg, rgba(255,95,210,.20), rgba(61,240,255,.08)); clip-path: var(--cut);
  box-shadow: 0 0 28px -8px #ff5fd2; animation: hv-pulse 2.4s ease-in-out infinite; transition: transform .15s, background .15s; }
.hv-offer:hover { transform: translateY(-2px); background: linear-gradient(120deg, rgba(255,95,210,.34), rgba(61,240,255,.14)); }
.hv-offer .hv-k { font-family: var(--mono); font-size: 10px; letter-spacing: .22em; color: #ff8fe0; }
.hv-offer b { font-size: 17px; font-weight: 900; letter-spacing: .02em; line-height: 1.35; }
.hv-offer small { font-size: 12px; color: var(--dim); }
@keyframes hv-pulse { 0%, 100% { box-shadow: 0 0 22px -10px #ff5fd2; } 50% { box-shadow: 0 0 34px -4px #ff5fd2; } }
.hv-on { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--dim); }
.hv-on a { color: var(--cyan); text-decoration: none; border-bottom: 1px dashed var(--cyan); margin-left: auto; }
.hv-tag { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .14em; padding: 2px 9px; background: #ff5fd2; color: #000; clip-path: var(--cut-s); }
/* 补丁版：对手卡片角上的标、型号后面的字变色 */
body.v-p1 #cards .card::after { content: "PATCH 1"; position: absolute; left: 10px; top: 12px; font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; padding: 2px 7px; background: #ff5fd2; color: #000; clip-path: var(--cut-s); }
body.v-p1 #menu .subtitle::after { content: " · 补丁版"; color: #ff5fd2; }
.hv-result { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: 700; color: #c2188f; }
