:root {
  --bg: #05070f;
  --panel: rgba(13, 19, 37, 0.84);
  --panel-2: rgba(19, 27, 51, 0.75);
  --line: rgba(122, 158, 255, 0.14);
  --line-strong: rgba(122, 158, 255, 0.3);
  --txt: #e9eeff;
  --muted: #8492b5;
  --muted-2: #5d6a8c;
  --cyan: #5eead4;
  --violet: #a78bfa;
  --red: #ff5d73;
  --amber: #ffd166;
  --green: #7bf1a8;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body.pk {
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  color: var(--txt);
  background:
    radial-gradient(1100px 650px at 10% -10%, rgba(94, 234, 212, 0.1), transparent 60%),
    radial-gradient(1000px 620px at 96% 0%, rgba(167, 139, 250, 0.12), transparent 55%),
    radial-gradient(900px 700px at 50% 118%, rgba(96, 165, 250, 0.1), transparent 60%),
    var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

body.pk::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1.4px 1.4px at 18% 22%, rgba(255, 255, 255, 0.5), transparent 100%),
    radial-gradient(1.2px 1.2px at 72% 12%, rgba(255, 255, 255, 0.38), transparent 100%),
    radial-gradient(1.6px 1.6px at 46% 68%, rgba(255, 255, 255, 0.32), transparent 100%),
    radial-gradient(1.1px 1.1px at 88% 52%, rgba(255, 255, 255, 0.4), transparent 100%),
    radial-gradient(1.3px 1.3px at 28% 84%, rgba(255, 255, 255, 0.3), transparent 100%);
  opacity: 0.6;
}

button { font-family: inherit; }
input { font-family: inherit; }
.hidden { display: none !important; }

/* ---------- 顶栏 ---------- */
#pTop {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 10, 22, 0.74);
  backdrop-filter: blur(16px);
  flex: 0 0 auto;
}

.pbrand { display: flex; align-items: center; gap: 9px; min-width: 160px; }
.pbrand-icon { font-size: 22px; filter: drop-shadow(0 0 10px rgba(94, 234, 212, 0.5)); }
.pbrand b { font-size: 14px; display: block; }
.pbrand em {
  font-style: normal; font-size: 10px; color: var(--cyan);
  border: 1px solid rgba(94, 234, 212, 0.35);
  padding: 1px 6px; border-radius: 999px; margin-left: 4px;
}
.pbrand small { display: block; font-size: 9px; color: var(--muted-2); letter-spacing: 1.5px; margin-top: 2px; }

.pme { display: flex; align-items: center; gap: 8px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.03); }
.pme .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #06101f; background: var(--cyan); }
.pmelabel { display: flex; flex-direction: column; line-height: 1.25; }
.pmelabel b { font-size: 12px; }
.role-tag { font-size: 9px; padding: 1px 7px; border-radius: 999px; font-weight: 700; letter-spacing: .5px; width: fit-content; }
.role-tag.crew { color: #7feedb; background: rgba(94, 234, 212, 0.1); border: 1px solid rgba(94, 234, 212, 0.3); }
.role-tag.imp { color: #ff97a7; background: rgba(255, 93, 115, 0.13); border: 1px solid rgba(255, 93, 115, 0.4); }

.pstats { display: flex; align-items: center; gap: 14px; flex: 1; justify-content: center; }
.stat { font-size: 11px; color: var(--muted); }
.stat b { color: var(--txt); }
.phase-badge { font-size: 11px; font-weight: 600; padding: 4px 12px; border-radius: 999px; background: rgba(148, 163, 184, 0.12); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.phase-badge.playing { color: var(--cyan); background: rgba(94, 234, 212, 0.1); border-color: rgba(94, 234, 212, 0.3); }
.phase-badge.meeting { color: var(--amber); background: rgba(255, 209, 102, 0.1); border-color: rgba(255, 209, 102, 0.35); }
.phase-badge.ended { color: var(--violet); background: rgba(167, 139, 250, 0.12); border-color: rgba(167, 139, 250, 0.35); }

.taskbar-wrap { display: flex; align-items: center; gap: 8px; min-width: 170px; }
.taskbar { flex: 1; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
#pTaskFill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #34d399, #5eead4); box-shadow: 0 0 12px rgba(94, 234, 212, 0.6); transition: width 0.4s ease; }
.taskbar-wrap span { font-size: 10px; color: var(--muted); white-space: nowrap; }

.kill-info { font-size: 10.5px; padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(255, 93, 115, 0.4); color: #ff97a7; background: rgba(255, 93, 115, 0.1); }
.kill-info.ready { color: #ffd166; border-color: rgba(255, 209, 102, 0.5); background: rgba(255, 209, 102, 0.1); }

.pactions { display: flex; gap: 7px; }

.btn {
  border: 1px solid var(--line-strong);
  background: var(--panel-2);
  color: var(--txt);
  border-radius: 10px;
  padding: 7px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
  font-weight: 500;
}
.btn:hover { border-color: rgba(94, 234, 212, 0.55); background: rgba(94, 234, 212, 0.08); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.small { padding: 5px 11px; font-size: 11px; border-radius: 9px; }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(255, 93, 115, 0.4); color: #ff92a2; }
.btn.danger:hover { background: rgba(255, 93, 115, 0.1); border-color: rgba(255, 93, 115, 0.65); }
.btn.primary {
  background: linear-gradient(135deg, rgba(94, 234, 212, 0.24), rgba(167, 139, 250, 0.3));
  border-color: rgba(94, 234, 212, 0.6);
  color: #eafffb;
  font-weight: 700;
  box-shadow: 0 8px 26px rgba(94, 234, 212, 0.18);
}
.btn.primary:hover { box-shadow: 0 10px 34px rgba(94, 234, 212, 0.3); }
.btn.primary.big { padding: 12px 34px; font-size: 14px; border-radius: 12px; }

/* ---------- 主区域 ---------- */
#pMain {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 336px;
  gap: 12px;
  padding: 12px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#pMapPanel { min-height: 0; }
.map-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px 8px; flex: 0 0 auto; }
.map-title { font-size: 12px; letter-spacing: 2px; color: var(--muted); }
.map-legend { display: flex; gap: 12px; font-size: 10px; color: var(--muted); }
.map-legend span { display: flex; align-items: center; gap: 5px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot.self { background: #fff; box-shadow: 0 0 6px #fff; }
.dot.alive { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); }
.dot.body { background: var(--red); box-shadow: 0 0 6px var(--red); }
.dot.reach { background: transparent; border: 1px dashed rgba(94, 234, 212, 0.8); }

.svg-wrap { flex: 1; min-height: 0; padding: 0 10px; }
#pMap { width: 100%; height: 100%; display: block; }
.map-foot { display: flex; justify-content: space-between; padding: 8px 16px 12px; font-size: 10px; color: var(--muted-2); gap: 10px; }

.corridor { stroke: #16203c; stroke-width: 30; stroke-linecap: round; }
.corridorGlow { stroke: rgba(94, 234, 212, 0.12); stroke-width: 2; stroke-dasharray: 6 10; stroke-linecap: round; }

.roomRect {
  fill: rgba(17, 24, 46, 0.97);
  stroke: rgba(122, 158, 255, 0.22);
  stroke-width: 1.5;
  transition: stroke 0.25s ease, fill 0.25s ease;
}
.roomName { fill: #aebadf; font-size: 15px; font-weight: 600; text-anchor: middle; letter-spacing: 2px; }
.roomTasks { fill: #5c6a8d; font-size: 11px; text-anchor: middle; letter-spacing: 1px; }

.room.reachable { cursor: pointer; }
.room.reachable .roomRect { stroke: rgba(94, 234, 212, 0.55); fill: rgba(24, 42, 65, 0.97); }
.room.reachable:hover .roomRect { stroke: var(--cyan); fill: rgba(34, 62, 84, 0.98); }
.room.current .roomRect { stroke: rgba(94, 234, 212, 0.4); }
.room.flash .roomRect { stroke: var(--red); fill: rgba(255, 93, 115, 0.16); }

.token { transition: transform 1.2s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; }
.token text { text-anchor: middle; font-weight: 800; fill: #071022; user-select: none; }
.token .ring { fill: none; stroke: var(--red); stroke-width: 2; stroke-dasharray: 5 4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.token.is-imp .ring { opacity: 0.9; animation: spin 6s linear infinite; }
.token.is-dead { opacity: 0.3; }
.token.is-dead circle.body { fill: #4b5563 !important; }
.token.self circle.body { stroke: #ffffff; stroke-width: 3; }
.token.self .selfRing { fill: none; stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.5; opacity: 0.9; }
@keyframes spin { to { transform: rotate(360deg); } }

.bodyMark { animation: bodyPulse 1.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bodyPulse { 0%, 100% { opacity: 0.6; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.06); } }

/* ---------- 右侧 ---------- */
#pSide { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.side-block { flex: 0 0 auto; }
.side-block.grow { flex: 1; min-height: 120px; }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px 8px; border-bottom: 1px solid var(--line); }
.side-head h2 { font-size: 11px; letter-spacing: 1.5px; color: var(--muted); font-weight: 600; }

.room-players { padding: 9px 12px; display: flex; flex-wrap: wrap; gap: 7px; min-height: 42px; }
.mini-player { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 3px 8px 3px 3px; border-radius: 999px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); }
.mini-player .avatar { width: 20px; height: 20px; font-size: 9px; }
.mini-player .mate-tag { font-size: 8px; color: #ff97a7; border: 1px solid rgba(255,93,115,.4); border-radius: 4px; padding: 0 3px; }
.mini-player.dead { opacity: .45; }
.room-empty { font-size: 11px; color: var(--muted-2); padding: 4px 0; }

.task-list { padding: 8px 12px 11px; display: flex; flex-direction: column; gap: 5px; max-height: 178px; overflow-y: auto; }
.task-item { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #aebbd8; padding: 4px 6px; border-radius: 7px; }
.task-item .troom { font-size: 9px; color: var(--muted-2); border: 1px solid rgba(255,255,255,.08); padding: 0 5px; border-radius: 4px; white-space: nowrap; }
.task-item .tname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-item .tstat { font-size: 9px; color: var(--muted-2); }
.task-item.done { color: var(--muted-2); text-decoration: line-through; opacity: .6; }
.task-item.here { background: rgba(94,234,212,.06); border: 1px dashed rgba(94,234,212,.22); }
.task-item.here .tstat { color: var(--cyan); }

.action-box { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 7px; max-height: 230px; overflow-y: auto; }
.action-btn {
  display: flex; align-items: center; gap: 8px;
  width: 100%; text-align: left;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.075);
  color: var(--txt);
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all .18s ease;
}
.action-btn:hover { background: rgba(94,234,212,.08); border-color: rgba(94,234,212,.4); }
.action-btn .k { font-size: 13px; }
.action-btn.kill { border-color: rgba(255,93,115,.3); color: #ffb3bd; background: rgba(255,93,115,.06); }
.action-btn.kill:hover { background: rgba(255,93,115,.14); border-color: rgba(255,93,115,.6); }
.action-btn.meeting { border-color: rgba(255,209,102,.28); color: #ffe3a3; background: rgba(255,209,102,.05); }
.action-btn.meeting:hover { background: rgba(255,209,102,.12); }
.action-empty { font-size: 11px; color: var(--muted-2); line-height: 1.6; }
.action-title { font-size: 9px; letter-spacing: 1px; color: var(--muted-2); margin-top: 4px; }

.feed { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 5px; }
.feed-item { font-size: 10.5px; line-height: 1.5; color: #a8b6d9; padding: 4px 7px; border-radius: 7px; background: rgba(255,255,255,.025); border-left: 2px solid rgba(122,158,255,.25); animation: feedIn .3s ease; word-break: break-word; }
.feed-item .lt { color: var(--muted-2); font-size: 8.5px; margin-right: 5px; }
.feed-item.kill { border-left-color: var(--red); color: #ffb3bd; background: rgba(255,93,115,.08); }
.feed-item.meeting, .feed-item.report { border-left-color: var(--amber); color: #ffe3a3; }
.feed-item.eject { border-left-color: var(--violet); color: #d7c9ff; }
.feed-item.end { border-left-color: var(--cyan); color: #b9fff4; font-weight: 600; }
.feed-item.task { border-left-color: rgba(123,241,168,.5); }
@keyframes feedIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---------- 覆盖层 ---------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(3, 6, 15, 0.8);
  backdrop-filter: blur(14px);
  padding: 18px;
  overflow-y: auto;
  animation: fadeIn .25s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.join-card {
  width: min(430px, 100%);
  text-align: center;
  padding: 34px 30px 26px;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(22, 30, 56, 0.98), rgba(9, 13, 26, 0.99));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 60px rgba(94,234,212,.06);
  animation: cardIn .4s cubic-bezier(.2,.8,.2,1);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.join-logo { font-size: 44px; filter: drop-shadow(0 0 18px rgba(94,234,212,.4)); }
.join-card h1 { font-size: 22px; margin: 8px 0 8px; letter-spacing: 1px; }
.join-card p { font-size: 11.5px; color: var(--muted); line-height: 1.7; margin-bottom: 18px; }
.join-card input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--txt);
  padding: 11px 13px;
  font-size: 13px;
  outline: none;
  margin-bottom: 10px;
  text-align: center;
}
.join-card input:focus { border-color: rgba(94,234,212,.55); }
.join-card .btn.primary.big { width: 100%; margin-bottom: 10px; }
.error { min-height: 16px; font-size: 11.5px; color: #ff97a7; }
.join-note { margin-top: 12px; font-size: 10.5px; color: var(--muted-2); }
.join-note a { color: var(--cyan); text-decoration: none; }

.wait-card {
  width: min(460px, 100%);
  text-align: center;
  padding: 32px 28px 24px;
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(22, 30, 56, 0.98), rgba(9, 13, 26, 0.99));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 100px rgba(0,0,0,.7);
  animation: cardIn .4s cubic-bezier(.2,.8,.2,1);
}
.wait-icon { font-size: 42px; }
.wait-card h1 { font-size: 19px; margin: 10px 0 6px; }
.wait-card p { font-size: 11.5px; line-height: 1.7; }
.wait-players { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 18px 0; max-height: 180px; overflow-y: auto; }
.wait-chip { display: flex; align-items: center; gap: 6px; font-size: 11px; padding: 4px 9px 4px 4px; border-radius: 999px; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); }
.wait-chip .avatar { width: 20px; height: 20px; font-size: 9px; }
.wait-chip.ai { border-style: dashed; }
.wait-chip .wt { font-size: 8px; color: var(--muted-2); }

.dead-banner {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 30;
  font-size: 11.5px; color: #ffb3bd;
  background: rgba(40, 12, 20, 0.92);
  border: 1px solid rgba(255,93,115,.4);
  padding: 8px 16px;
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  backdrop-filter: blur(10px);
}

/* ---------- 会议 ---------- */
.meeting-card {
  width: min(760px, 100%);
  max-height: min(90vh, 860px);
  display: flex;
  flex-direction: column;
  background: linear-gradient(165deg, rgba(22, 30, 56, 0.98), rgba(9, 13, 26, 0.99));
  border: 1px solid rgba(255, 209, 102, 0.25);
  border-radius: 22px;
  box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 60px rgba(255,209,102,.06);
  overflow: hidden;
  animation: cardIn .35s cubic-bezier(.2,.8,.2,1);
}
.meeting-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--line); position: relative; flex: 0 0 auto; }
.meeting-title { font-size: 17px; font-weight: 800; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
.siren { animation: shake 1.5s infinite; display: inline-block; }
@keyframes shake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-12deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(8deg); } }
.meeting-reason { font-size: 12px; color: var(--amber); margin-top: 6px; }
.meeting-stage { position: absolute; right: 22px; top: 20px; font-size: 10px; letter-spacing: 1px; color: var(--muted); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.03); }
.meeting-chat { flex: 1; min-height: 150px; overflow-y: auto; padding: 14px 22px; display: flex; flex-direction: column; gap: 9px; }
.chat-msg { display: flex; gap: 9px; animation: feedIn .3s ease; }
.chat-msg .avatar { width: 24px; height: 24px; font-size: 11px; margin-top: 1px; flex: 0 0 auto; }
.chat-bubble { flex: 1; min-width: 0; }
.chat-name { font-size: 11px; font-weight: 700; margin-bottom: 2px; }
.chat-name .me-tag { font-size: 8px; color: var(--cyan); border: 1px solid rgba(94,234,212,.4); border-radius: 4px; padding: 0 3px; margin-left: 4px; }
.chat-text { font-size: 12.5px; line-height: 1.6; color: #cfd8ef; background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.05); border-radius: 4px 12px 12px 12px; padding: 7px 11px; display: inline-block; max-width: 100%; word-break: break-word; }
.chat-msg.mine .chat-text { background: rgba(94,234,212,.07); border-color: rgba(94,234,212,.2); }
.chat-sys { font-size: 11px; color: var(--muted); text-align: center; padding: 3px 0; letter-spacing: .5px; }

.speak-box { display: flex; gap: 8px; padding: 12px 22px; border-top: 1px solid var(--line); background: rgba(0,0,0,.15); flex: 0 0 auto; }
.speak-box input {
  flex: 1; min-width: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--txt);
  padding: 9px 12px;
  font-size: 12px;
  outline: none;
}
.speak-box input:focus { border-color: rgba(94,234,212,.5); }
.meet-note { padding: 10px 22px; font-size: 10.5px; color: var(--muted-2); border-top: 1px solid var(--line); text-align: center; background: rgba(0,0,0,.12); }

.vote-player { padding: 14px 22px 16px; border-top: 1px solid var(--line); background: rgba(0,0,0,.15); flex: 0 0 auto; max-height: 250px; overflow-y: auto; }
.vote-hint { font-size: 10.5px; color: var(--muted); margin-bottom: 10px; }
.vote-grid { display: flex; flex-wrap: wrap; gap: 7px; }
.vote-btn {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.09);
  background: rgba(255,255,255,.035);
  color: var(--txt);
  font-size: 11.5px;
  cursor: pointer;
  transition: all .18s ease;
}
.vote-btn:hover { border-color: rgba(255,209,102,.55); background: rgba(255,209,102,.1); }
.vote-btn .avatar { width: 22px; height: 22px; font-size: 10px; }
.vote-btn.skip { border-style: dashed; color: var(--muted); }
.vote-btn:disabled { opacity: .4; cursor: not-allowed; }
.vote-btn.chosen { border-color: var(--amber); background: rgba(255,209,102,.16); }

.meeting-result { padding: 16px 22px 20px; text-align: center; border-top: 1px solid var(--line); animation: fadeIn .3s ease; flex: 0 0 auto; }
.meeting-result h3 { font-size: 16px; margin-bottom: 6px; }
.meeting-result p { font-size: 11.5px; color: var(--muted); line-height: 1.7; }

/* ---------- 结算 ---------- */
.end-card {
  width: min(580px, 100%);
  text-align: center;
  background: linear-gradient(165deg, rgba(22, 30, 56, 0.98), rgba(9, 13, 26, 0.99));
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  padding: 32px 28px 24px;
  box-shadow: 0 40px 100px rgba(0,0,0,.7);
  animation: cardIn .45s cubic-bezier(.2,.8,.2,1);
}
.end-icon { font-size: 50px; margin-bottom: 4px; }
.end-card h1 { font-size: 23px; letter-spacing: 1px; margin-bottom: 8px; background: linear-gradient(90deg, #5eead4, #a78bfa); -webkit-background-clip: text; background-clip: text; color: transparent; }
.end-verdict { font-size: 13px; font-weight: 700; margin-top: 12px; }
.end-verdict.win { color: var(--green); }
.end-verdict.lose { color: #ff97a7; }
.end-roles { margin: 16px 0 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; text-align: left; max-height: 300px; overflow-y: auto; }
.end-role { display: flex; align-items: center; gap: 8px; font-size: 11.5px; padding: 7px 10px; border-radius: 9px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.05); }
.end-role .avatar { width: 22px; height: 22px; font-size: 10px; }
.end-role .dead-mark { margin-left: auto; font-size: 10px; color: var(--muted-2); }
.end-role.me { border-color: rgba(94,234,212,.45); background: rgba(94,234,212,.06); }
.end-note { font-size: 10.5px; color: var(--muted-2); }

.avatar { border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #06101f; flex: 0 0 auto; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; top: 74px; transform: translate(-50%, -12px);
  z-index: 90;
  padding: 9px 18px;
  border-radius: 10px;
  background: rgba(40, 24, 12, 0.95);
  border: 1px solid rgba(255,209,102,.45);
  color: #ffe3a3;
  font-size: 11.5px;
  opacity: 0;
  pointer-events: none;
  transition: all .25s ease;
  max-width: 80vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(122, 158, 255, 0.18); border-radius: 999px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  #pMain { grid-template-columns: minmax(0, 1fr) 290px; }
  .pbrand small { display: none; }
  .pstats { gap: 9px; }
  .taskbar-wrap { min-width: 120px; }
  .pbrand { min-width: 0; }
}

@media (max-width: 820px) {
  body.pk { overflow: auto; }
  #pTop { flex-wrap: wrap; gap: 9px; padding: 9px 12px; }
  .pstats { order: 4; width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  #pMain { grid-template-columns: 1fr; height: auto; }
  #pMapPanel { min-height: 340px; }
  #pSide { min-height: auto; }
  .side-block.grow { min-height: 180px; }
  .end-roles { grid-template-columns: 1fr; }
}
