/* =========================================================
 *  狼人杀 · 像素方块风格样式表
 * ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f1219;
  --panel: #1e2431;
  --panel2: #262e3d;
  --panel3: #323c4f;
  --line: #05070a;
  --text: #e9eff8;
  --muted: #93a1b8;
  --green: #55b85a;
  --gold: #e8b93a;
  --red: #e05a5a;
  --blue: #56a0dd;
  --purple: #a06ad6;
}

html, body { min-height: 100%; }

body {
  background: var(--bg);
  background-image:
    radial-gradient(circle at 15% -5%, rgba(86, 160, 221, .10), transparent 42%),
    radial-gradient(circle at 85% 105%, rgba(160, 106, 214, .10), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 2px, transparent 2px 4px);
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* --------- 像素方块基础 --------- */
.pixel {
  border: 3px solid var(--line);
  box-shadow:
    inset 0 3px 0 rgba(255, 255, 255, .06),
    inset 0 -3px 0 rgba(0, 0, 0, .38),
    0 3px 0 rgba(0, 0, 0, .45);
}

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 20px 16px 64px;
  animation: fade .22s ease-out;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none;} }
.fade { animation: fade .3s ease-out; }

/* --------- 顶栏 --------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 6px 0 16px;
}
.logo {
  font-size: 22px; font-weight: 800; letter-spacing: 2px;
  font-family: Consolas, "Courier New", monospace;
}
.logo .sub {
  font-size: 12px; font-weight: 500; letter-spacing: 0;
  color: var(--muted); margin-left: 10px;
  border-left: 2px solid var(--panel3); padding-left: 10px;
}
.small-logo { font-size: 17px; letter-spacing: 1px; }

/* --------- 卡片 --------- */
.card {
  background: var(--panel);
  padding: 18px;
  margin-bottom: 16px;
}
.h2 {
  font-size: 16px; margin-bottom: 12px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; font-size: 13px; font-weight: 800;
  background: var(--green); color: #06210a;
  border: 3px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.25);
}
.h3 {
  font-size: 13px; color: var(--muted); margin: 16px 0 8px;
  letter-spacing: 1px; font-weight: 700;
}
.tip { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.tip.ok { color: var(--green); }
.tip.err { color: var(--red); }
.tip.warn { color: var(--gold); }
.hint { font-size: 12px; color: var(--muted); margin-left: 10px; }
.foot-note {
  text-align: center; font-size: 12px; color: var(--muted);
  margin-top: 12px;
}

/* --------- 按钮 --------- */
.btn {
  font-family: inherit; font-size: 14px; font-weight: 600;
  color: var(--text); background: var(--panel3);
  border: 3px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.12), inset 0 -3px 0 rgba(0,0,0,.38), 0 3px 0 rgba(0,0,0,.45);
  padding: 9px 18px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover:not(:disabled) { filter: brightness(1.15); }
.btn:active:not(:disabled) { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255,255,255,.06), inset 0 -3px 0 rgba(0,0,0,.38); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.primary { background: var(--green); color: #06210a; }
.btn.ghost { background: var(--panel2); color: var(--muted); }
.btn.small { font-size: 12px; padding: 6px 12px; }
.btn.tiny { font-size: 12px; padding: 5px 10px; background: var(--panel2); }
.btn.big { width: 100%; font-size: 17px; padding: 15px; letter-spacing: 3px; margin-top: 4px; }
.btn.sq { width: 48px; height: 48px; font-size: 22px; padding: 0; font-weight: 800; }
.btn-row { display: flex; gap: 10px; margin-top: 14px; }
.btn-row .btn { flex: 1; }
.row-end { display: flex; justify-content: flex-end; margin-top: 10px; }

/* --------- 人数 --------- */
.counter { display: flex; align-items: center; gap: 14px; }
.count-num {
  font-family: Consolas, monospace; font-size: 30px; font-weight: 800;
  min-width: 68px; text-align: center; color: var(--gold);
}
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* --------- 夜晚行动模式选择 --------- */
.mode-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; margin-bottom: 10px; }
.mode-card {
  font-family: inherit; text-align: left; color: var(--text);
  background: var(--panel2); border: 3px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.07), inset 0 -3px 0 rgba(0,0,0,.35);
  padding: 12px 14px; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.mode-card:hover { filter: brightness(1.15); }
.mode-card.on { background: #2c4433; box-shadow: inset 0 0 0 2px var(--green), inset 0 -3px 0 rgba(0,0,0,.35); }
.mc-title { font-size: 14px; font-weight: 800; letter-spacing: 1px; }
.mc-desc { font-size: 12px; color: var(--muted); line-height: 1.5; }
.mode-card.on .mc-desc { color: #bfe6c4; }

/* --------- 角色卡 --------- */
.role-group { margin-bottom: 16px; }
.rg-title {
  font-size: 13px; font-weight: 700; color: var(--muted);
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px; letter-spacing: 1px;
}
.camp-dot { width: 10px; height: 10px; display: inline-block; border: 2px solid var(--line); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.role-card {
  position: relative; font-family: inherit; color: var(--text);
  background: var(--panel2); border: 3px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.07), inset 0 -3px 0 rgba(0,0,0,.35);
  padding: 10px 6px 8px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.role-card:hover:not(:disabled) { filter: brightness(1.2); }
.role-card:disabled { opacity: .4; cursor: not-allowed; }
.role-card.on { background: #2c4433; box-shadow: inset 0 0 0 2px var(--green), inset 0 -3px 0 rgba(0,0,0,.35); }
.rc-emoji { font-size: 20px; line-height: 1; }
.rc-name { font-size: 12px; font-weight: 600; }
.rc-num {
  position: absolute; top: -3px; right: -3px;
  min-width: 22px; height: 22px; font-size: 12px; font-weight: 800;
  background: var(--panel3); border: 3px solid var(--line); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.role-card.on .rc-num { background: var(--green); color: #06210a; }

/* --------- 牌堆 chips --------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel2); border: 3px solid var(--line);
  padding: 5px 8px 5px 10px; font-size: 13px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06);
}
.chip b { color: var(--gold); }
.chip-x {
  cursor: pointer; font-style: normal; margin-left: 2px;
  width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center;
  background: #5a2a2a; color: #ffd7d7; font-weight: 800; border: 2px solid var(--line);
}
.chip-x:hover { background: var(--red); color: #fff; }

.pill {
  margin-left: auto; font-size: 12px; font-weight: 700; padding: 3px 10px;
  background: var(--panel3); color: var(--muted); border: 3px solid var(--line);
}
.pill.ok { background: #1f4a28; color: #b6f0be; }
.pill.warn { background: #4a3c1a; color: #f2dfa4; }
.pill.off { background: #333; color: #887; }

.vchip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 4px 9px; border: 3px solid var(--line);
  background: var(--panel2);
}
.vchip.ok { background: #1f4a28; color: #b6f0be; }
.vchip.bad { background: #4d2323; color: #ffc4c4; }

/* --------- 玩家座位（牌桌） --------- */
.seat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.seat-card {
  background: var(--panel2); border: 3px solid var(--line); padding: 10px;
  cursor: pointer; text-align: center;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06), inset 0 -3px 0 rgba(0,0,0,.35);
  transition: background .18s;
}
.seat-card:hover { background: var(--panel3); }
.seat-card.flipped { background: #24323f; }
.seat-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.seat-no { font-family: Consolas, monospace; font-weight: 800; color: var(--gold); font-size: 13px; }
.seat-name { font-size: 12px; color: var(--muted); border-bottom: 2px dashed transparent; }
.seat-name:hover { color: var(--blue); border-bottom-color: var(--blue); }
.seat-role {
  margin-top: 8px; padding: 6px; border: 3px solid var(--line);
  background: var(--panel); display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; min-height: 38px;
}
.seat-role.hidden-role { color: var(--muted); background: #171c26; letter-spacing: 1px; }
.sr-emoji { font-size: 16px; }

/* --------- 头像 --------- */
.avatar {
  border: 3px solid var(--line); background: #000; overflow: hidden;
  image-rendering: pixelated; flex: 0 0 auto;
  box-shadow: 0 2px 0 rgba(0,0,0,.4);
}
.av-grid { display: grid; grid-template-columns: repeat(8, 1fr); grid-template-rows: repeat(8, 1fr); width: 100%; height: 100%; }
.av-grid i { display: block; }

/* --------- 交接屏 --------- */
.handoff-wrap { text-align: center; padding-top: 32px; }
.moon { font-size: 54px; line-height: 1; }
.sun { font-size: 54px; line-height: 1; text-align: center; }
.night-title {
  text-align: center; font-size: 20px; font-weight: 800; letter-spacing: 4px;
  margin: 10px 0 22px; color: var(--gold);
  font-family: Consolas, "Courier New", monospace;
}
.handoff-card {
  background: var(--panel); padding: 28px 22px; max-width: 420px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.handoff-tip { color: var(--muted); font-size: 14px; }
.handoff-name { font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.handoff-role-mask { font-size: 12px; color: var(--muted); margin-bottom: 6px; }

/* --------- 我的信息条 --------- */
.me-bar {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel2); padding: 10px 14px; margin-bottom: 16px;
}
.me-info { display: flex; flex-direction: column; }
.me-seat { font-size: 14px; font-weight: 700; }
.me-role { font-size: 13px; color: var(--muted); }
.me-role b { color: var(--gold); }

/* --------- 狼队友面板（仅狼人可见） --------- */
.mates {
  background: linear-gradient(180deg, #3a1f22, #23161a);
  padding: 12px 14px; margin-bottom: 16px;
}
.mates-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 14px; font-weight: 800; letter-spacing: 1px;
  color: #ffd9d9; margin-bottom: 10px;
}
.mates-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.mate {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel2); border: 3px solid var(--line);
  padding: 6px 10px 6px 6px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06);
}
.mate.me { background: #4d2323; box-shadow: inset 0 0 0 2px var(--red), inset 0 -3px 0 rgba(0,0,0,.35); }
.mate-text { display: flex; flex-direction: column; }
.mate-seat { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.mate-you {
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  background: var(--red); color: #fff; border: 2px solid var(--line); padding: 0 4px;
}
.mate-role { font-size: 12px; color: #e8b0b0; }

/* --------- 目标选择网格 --------- */
.tgt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 6px 0 12px; }
.tgt {
  font-family: inherit; color: var(--text); background: var(--panel2);
  border: 3px solid var(--line); padding: 8px 4px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06), inset 0 -3px 0 rgba(0,0,0,.35);
}
.tgt:hover:not(:disabled) { filter: brightness(1.2); }
.tgt:disabled { opacity: .3; cursor: not-allowed; }
.tgt.on { background: #4d3a1a; box-shadow: inset 0 0 0 2px var(--gold), inset 0 -3px 0 rgba(0,0,0,.35); }
.tgt-no { font-family: Consolas, monospace; font-size: 12px; font-weight: 800; color: var(--gold); }
.tgt-name { font-size: 11px; color: var(--muted); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.vote-line { font-size: 13px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }

/* --------- 结果框 --------- */
.result-box {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  border: 3px solid var(--line); margin-bottom: 14px;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.06);
}
.result-box.good { background: #1f4a28; }
.result-box.bad { background: #4d2323; }
.rb-text { display: flex; flex-direction: column; }
.rb-seat { font-size: 13px; color: rgba(255,255,255,.75); }
.rb-verdict { font-size: 22px; font-weight: 800; letter-spacing: 4px; }
.rb-verdict.small { font-size: 16px; letter-spacing: 2px; }

.info-row { display: flex; gap: 8px; margin-bottom: 12px; }

/* --------- 留言板 --------- */
.notes { display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; margin-bottom: 12px; }
.note { background: var(--panel2); border: 3px solid var(--line); padding: 8px 10px; }
.note.mine { background: #2c4433; }
.note-head { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.note-body { font-size: 14px; word-break: break-word; }
.note-input { display: flex; gap: 8px; }
.input {
  flex: 1; font-family: inherit; font-size: 14px; color: var(--text);
  background: #141a24; border: 3px solid var(--line); padding: 9px 11px; outline: none;
}
.input:focus { border-color: var(--green); }

/* --------- 天亮 --------- */
.dead-list { display: flex; flex-wrap: wrap; gap: 10px; }
.dead-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: #3a2020; border: 3px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.05);
}
.di-text { display: flex; flex-direction: column; }
.di-text span { font-size: 12px; color: #d9a0a0; }
.peace { color: var(--green); font-size: 16px; font-weight: 700; padding: 8px 0; }
.event-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.event-list li { font-size: 13px; color: var(--muted); padding-left: 16px; position: relative; }
.event-list li::before { content: "▸"; position: absolute; left: 0; color: var(--gold); }

/* --------- 投票结果 --------- */
.vote-row {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 10px;
  padding: 8px 10px; border: 3px solid var(--line); background: var(--panel2); margin-bottom: 6px;
}
.vote-row.top { background: #4d3a1a; box-shadow: inset 0 0 0 2px var(--gold); }
.vr-seat { font-weight: 700; font-size: 14px; }
.vr-cnt { font-family: Consolas, monospace; color: var(--gold); font-weight: 800; }
.vr-who { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* --------- 结束 --------- */
.over-banner {
  text-align: center; padding: 30px 20px; margin-bottom: 16px;
  border: 3px solid var(--line);
  box-shadow: inset 0 3px 0 rgba(255,255,255,.08), inset 0 -3px 0 rgba(0,0,0,.4), 0 3px 0 rgba(0,0,0,.45);
}
.over-banner.wolf { background: linear-gradient(180deg, #4d2323, #2a1414); }
.over-banner.good { background: linear-gradient(180deg, #1f4a28, #142a19); }
.ob-emoji { font-size: 46px; }
.ob-title { font-size: 26px; font-weight: 800; letter-spacing: 4px; margin: 8px 0; }
.ob-reason { font-size: 13px; color: rgba(255,255,255,.7); }
.over-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.over-seat {
  background: var(--panel2); border: 3px solid var(--line); padding: 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.over-seat.dead { opacity: .5; filter: grayscale(.7); }
.os-name { font-size: 12px; font-weight: 700; }
.os-role { font-size: 12px; color: var(--gold); }
.os-state { font-size: 11px; color: var(--muted); }

/* --------- 模态框 --------- */
.modal {
  position: fixed; inset: 0; background: rgba(3, 5, 9, .82);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  z-index: 100;
}
.modal.hidden { display: none; }
.modal-card {
  background: var(--panel); padding: 20px; max-width: 520px; width: 100%;
  max-height: 84vh; display: flex; flex-direction: column;
  animation: fade .18s ease-out;
}
.modal-title { font-size: 16px; margin-bottom: 12px; }
.modal-body { overflow-y: auto; font-size: 13px; color: #cbd6e6; }
.modal-body p { margin-bottom: 8px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.rule-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.rule-list li { padding-left: 14px; position: relative; line-height: 1.5; }
.rule-list li::before { content: "▪"; position: absolute; left: 0; color: var(--green); }
.rule-list b { color: var(--gold); }

/* --------- AI 旁白 --------- */
.topbar-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.ai-narr { margin: 0 auto 14px; max-width: 620px; display: flex; flex-direction: column; gap: 6px; }
.ai-narr:empty { display: none; }

.ai-line {
  display: flex; align-items: flex-start; gap: 10px;
  background: #17202e; border: 3px solid var(--line);
  border-left: 6px solid var(--purple);
  padding: 10px 12px; text-align: left;
  box-shadow: inset 0 2px 0 rgba(255,255,255,.05);
  animation: fade .3s ease-out;
}
.ai-tag {
  flex: 0 0 auto; font-size: 10px; font-weight: 800; letter-spacing: 1px;
  color: #10131a; background: var(--purple); padding: 2px 6px;
  border: 2px solid var(--line); margin-top: 1px;
}
.ai-text { font-size: 14px; line-height: 1.6; color: #dfe8f5; }
.ai-text em { font-style: normal; font-size: 12px; color: var(--red); }

.ai-line.ai-loading { border-left-color: var(--muted); }
.ai-line.ai-loading .ai-tag { background: var(--muted); }
.ai-dots { display: inline-flex; gap: 5px; padding: 7px 0; }
.ai-dots i {
  width: 7px; height: 7px; background: var(--purple); display: block;
  animation: blink 1s infinite;
}
.ai-dots i:nth-child(2) { animation-delay: .18s; }
.ai-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

.ai-line.ai-err { border-left-color: var(--red); }
.ai-line.ai-err .ai-tag { background: var(--red); }

/* --------- AI 设置弹窗 --------- */
.ds-status {
  margin-top: 12px; padding: 8px 10px; font-size: 12px;
  background: var(--panel2); border: 3px solid var(--line); color: var(--muted);
  word-break: break-all;
}
.ds-status.ok { background: #1f4a28; color: #b6f0be; }
.ds-status.err { background: #4d2323; color: #ffc4c4; }
.ds-status.warn { background: #4a3c1a; color: #f2dfa4; }
.ds-status.loading { background: #2b2f4a; color: #c9cdf0; }

/* --------- Toast --------- */.toast {
  position: fixed; left: 50%; bottom: 36px; transform: translate(-50%, 20px);
  background: var(--panel3); color: var(--text);
  border: 3px solid var(--line); padding: 10px 20px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all .22s ease;
  z-index: 200;
  box-shadow: 0 4px 0 rgba(0,0,0,.5);
  max-width: 88vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --------- 窄屏 --------- */
@media (max-width: 520px) {
  .wrap { padding: 14px 10px 48px; }
  .logo { font-size: 18px; }
  .logo .sub { display: none; }
  .card { padding: 14px; }
  .seat-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .tgt-grid { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
  .btn.big { font-size: 15px; letter-spacing: 2px; }
  .mode-row.three { grid-template-columns: 1fr; }
  .over-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
}

/* =========================================================
 *  升级版新增样式
 * ========================================================= */

/* --------- 角色分组计数 --------- */
.rg-count { margin-left: auto; font-size: 11px; color: var(--muted); opacity: .8; font-weight: 500; }

/* --------- 开关行 --------- */
.opt-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.opt-row {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  font-family: inherit; color: var(--text); cursor: pointer;
  background: var(--panel2); border: 3px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.07), inset 0 -3px 0 rgba(0,0,0,.35);
  padding: 10px 12px;
}
.opt-row:hover { filter: brightness(1.15); }
.opt-row.on { background: #2c4433; box-shadow: inset 0 0 0 2px var(--green), inset 0 -3px 0 rgba(0,0,0,.35); }
.opt-box {
  flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
  background: var(--panel); border: 3px solid var(--line);
  font-size: 13px; font-weight: 800; color: #06210a;
}
.opt-row.on .opt-box { background: var(--green); }
.opt-text { display: flex; flex-direction: column; gap: 2px; }
.opt-text b { font-size: 14px; }
.opt-text em { font-style: normal; font-size: 12px; color: var(--muted); line-height: 1.5; }
.opt-row.on .opt-text em { color: #bfe6c4; }

.counter.small-counter { gap: 10px; }
.count-num.small { font-size: 22px; min-width: 62px; }

.mode-row.three { grid-template-columns: repeat(3, 1fr); }
.mode-card.compact { padding: 10px 11px; }
.mode-card.compact .mc-desc { font-size: 11px; }

/* --------- AI 标记 --------- */
.avatar-wrap { position: relative; display: inline-block; flex: 0 0 auto; }
.ai-badge {
  position: absolute; right: -4px; bottom: -4px;
  font-size: 9px; font-weight: 800; letter-spacing: .5px;
  background: var(--purple); color: #fff;
  border: 2px solid var(--line); padding: 0 3px; line-height: 1.35;
}
.ai-badge.inline {
  position: static; display: inline-block; margin-left: 6px;
  font-size: 9px; vertical-align: middle;
}
.seat-card.is-ai { background: #2a2438; }
.seat-card.is-ai.flipped { background: #33294a; }
.tgt.is-ai { background: #2a2438; }
.over-seat.is-ai { background: #2a2438; }
.note.ai { background: #241f38; border-left: 4px solid var(--purple); }

.handoff-card.ai-handoff { background: #211b30; gap: 10px; }
.ai-handoff .handoff-name { font-size: 20px; }

/* --------- 说话 / 计时 --------- */
.timebar {
  position: relative; height: 30px; margin-bottom: 16px;
  background: var(--panel2); border: 3px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(0,0,0,.3); overflow: hidden;
}
.tb-fill {
  position: absolute; inset: 0 auto 0 0; background: var(--green);
  transition: width .95s linear, background .3s;
}
.timebar.warn .tb-fill { background: var(--gold); }
.timebar.danger .tb-fill { background: var(--red); }
.tb-text {
  position: relative; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: Consolas, monospace; font-weight: 800; font-size: 15px;
  color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.7); letter-spacing: 1px;
}

/* --------- 遗言 --------- */
.os-last {
  grid-column: 1 / -1; font-size: 11px; color: var(--gold);
  margin-top: 4px; line-height: 1.4; text-align: left;
  border-top: 2px dashed var(--panel3); padding-top: 4px;
}

/* --------- 盗贼 --------- */
.thief-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.thief-card {
  font-family: inherit; color: var(--text); cursor: pointer;
  background: var(--panel2); border: 3px solid var(--line);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.07), inset 0 -3px 0 rgba(0,0,0,.35);
  padding: 20px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.thief-card:hover { filter: brightness(1.2); background: #2c4433; }
.tc-emoji { font-size: 34px; line-height: 1; }
.tc-name { font-size: 17px; font-weight: 800; letter-spacing: 1px; }
.tc-camp { font-size: 12px; }

/* --------- 骑士决斗入口 --------- */
.duel-entry { margin-top: 14px; padding-top: 12px; border-top: 3px dashed var(--panel3); }
.duel-entry .btn { width: 100%; }

/* --------- 结束页扩展 --------- */
.over-banner.third { background: linear-gradient(180deg, #4a2a5c, #2a1636); }
.over-banner.lovers { background: linear-gradient(180deg, #5c2a44, #361626); }

/* --------- 战绩 --------- */
.stat-box {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
  background: var(--panel2); border: 3px solid var(--line); padding: 12px;
}
.stat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; padding: 4px 0;
}
.stat-row + .stat-row { border-top: 2px solid var(--panel); }
.sr-name { color: var(--muted); }
.stat-row .sr-name { color: var(--text); }
.sr-val { font-family: Consolas, monospace; font-weight: 800; color: var(--gold); }

