:root {
  --bg: #2A1B5E;
  --bg-deep: #120A33;
  --accent: #F0B45A;
  --line: #7C5CE0;
  --text: #E8E6FF;
  --muted: #A79FD0;
  --danger: #C0392B;
  --card: rgba(255, 255, 255, 0.06);
  --radius: 14px;
  --font: "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  /* VI：紫夜金 */
  --violet: #7C5CE0;
  --violet-soft: #9B85F5;
  --line-soft: rgba(124, 92, 224, 0.45);
  --success: #22C55E;
  --font-display: "Songti SC", "Source Han Serif SC", "Noto Serif SC", STSong, SimSun, serif;
  --brand-mark: url("/assets/brand/mark-512.png");
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -6%, rgba(124, 92, 224, 0.5), transparent 58%),
    radial-gradient(circle at 12% 12%, rgba(155, 133, 245, 0.18), transparent 46%),
    linear-gradient(180deg, var(--bg), var(--bg-deep) 72%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
}

.shell { max-width: 480px; margin: 0 auto; padding: 16px 16px 40px; }
.shell.wide { max-width: 720px; }

.brandbar { display: flex; align-items: center; gap: 10px; padding: 6px 0 14px; }
.brandbar img { width: 34px; height: 34px; border-radius: 50%; object-fit: contain; filter: drop-shadow(0 0 8px rgba(124, 92, 224, 0.5)); }
.brandbar .name { font-size: 16px; letter-spacing: 2px; font-weight: 600; }
.brandbar .sub { font-size: 12px; color: var(--muted); }
.brandbar .spacer { flex: 1; }

.staffbar { display: flex; align-items: center; gap: 7px; min-width: 0; }
.staffbar .staffavatar {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 auto;
  border: 1px solid var(--line-soft); background: rgba(124, 92, 224, 0.22);
}
.staffbar .staffavatar.fallback {
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--violet-soft); font-size: 12px; font-weight: 600;
}
.staffbar .staffname {
  max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 12px;
}
.staffbar .stafflogout { flex: 0 0 auto; padding: 5px 8px; font-size: 11px; }
.staffbar.stafffloat {
  position: fixed; top: 14px; right: 14px; z-index: 20;
  padding: 5px 8px 5px 6px; border-radius: 999px;
  background: rgba(18, 10, 51, 0.72); border: 1px solid var(--line-soft);
  backdrop-filter: blur(10px);
}
@media (max-width: 560px) {
  .staffbar .staffname { max-width: 56px; }
  .staffbar .stafflogout { padding: 5px 7px; }
}

.hero {
  position: relative; border-radius: 16px; overflow: hidden; margin-bottom: 16px;
  border: 1px solid rgba(124, 92, 224, 0.6);
}
.hero img { width: 100%; display: block; }
.hero .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18, 10, 51, 0.1), rgba(18, 10, 51, 0.94));
  display: flex; flex-direction: column; justify-content: flex-end; padding: 16px;
}
.hero h1 { margin: 0; font-size: 24px; letter-spacing: 3px; }
.hero p { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.hero .tag {
  position: absolute; top: 12px; right: 12px; font-size: 11px;
  border: 1px solid var(--accent); color: var(--accent); border-radius: 999px; padding: 2px 10px;
}

.card {
  background: var(--card);
  border: 1px solid rgba(124, 92, 224, 0.45);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
}
.card.tight { padding: 10px 12px; }
.card h2 { margin: 0 0 10px; font-size: 15px; font-weight: 600; letter-spacing: 1px; }

.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }

.btn {
  appearance: none; border: 1px solid var(--line); background: transparent; color: var(--text);
  border-radius: 10px; padding: 10px 16px; font-size: 14px; font-family: var(--font);
  cursor: pointer; transition: 0.15s; white-space: nowrap;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: #2A1B5E; border-color: var(--accent); font-weight: 600; }
.btn.ghost { border-color: rgba(232, 230, 255, 0.2); color: var(--muted); }
.btn.danger { border-color: var(--danger); color: #FF8C7A; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.block { width: 100%; justify-content: center; }
.btn.sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

.input, select, textarea {
  width: 100%; font-family: var(--font); font-size: 14px; color: var(--text);
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(124, 92, 224, 0.5);
  border-radius: 10px; padding: 10px 12px; outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 180, 90, 0.16); }
.hint { font-size: 12px; color: var(--muted); }
.gold { color: var(--accent); }
.danger-text { color: #FF8C7A; }

.code { font-size: 30px; letter-spacing: 8px; color: var(--accent); font-weight: 700; }

.seats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.seat {
  position: relative; border: 1px solid rgba(124, 92, 224, 0.5); border-radius: 10px;
  background: rgba(0, 0, 0, 0.25); padding: 8px 10px; min-height: 70px;
}
.seat .no { font-size: 11px; color: var(--accent); letter-spacing: 1px; }
.seat .nick { font-size: 13px; margin-top: 4px; word-break: break-all; }
.seat .role { font-size: 11px; color: var(--muted); margin-top: 2px; }
.seat.dead { opacity: 0.45; }
.seat.dead .nick { text-decoration: line-through; }
.seat.empty { border-style: dashed; }
.seat.speaking { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
/* 夜间代操作选中态 + 座位内气泡（代确认 / 身份） */
.seat.sel {
  border-color: var(--accent);
  background: rgba(240, 180, 90, 0.12);
  box-shadow: 0 0 0 2px rgba(240, 180, 90, 0.45) inset, 0 0 14px rgba(240, 180, 90, 0.22);
}
.seat-bubble {
  display: inline-flex; align-items: center; justify-content: center;
  margin-top: 6px; padding: 2px 10px; min-width: 58px; height: 22px; box-sizing: border-box;
  border-radius: 999px; font-size: 11px; letter-spacing: 1px; line-height: 1;
  border: 1px solid rgba(240, 180, 90, 0.55); background: rgba(240, 180, 90, 0.14);
  color: var(--accent); cursor: pointer; user-select: none;
}
.seat-bubble:hover { background: rgba(240, 180, 90, 0.26); }
.seat-bubble.role {
  border-color: rgba(124, 92, 224, 0.65); background: rgba(124, 92, 224, 0.22);
  color: #BBA9FF; cursor: default;
}
.seat-bubble.role:hover { background: rgba(124, 92, 224, 0.22); }
.seat .dot { position: absolute; right: 8px; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: #5B5478; }
.seat .dot.on { background: #58D68D; }

.chip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--muted);
  border: 1px solid rgba(232, 230, 255, 0.16); border-radius: 999px; padding: 3px 9px;
  white-space: nowrap;
}
.chip.on { color: var(--accent); border-color: var(--accent); }

.kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed rgba(232, 230, 255, 0.08); font-size: 13px; }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }

.phasebar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 1px solid rgba(240, 180, 90, 0.5); border-radius: 12px; padding: 10px 14px;
  background: rgba(240, 180, 90, 0.08); margin-bottom: 12px;
}
.phasebar .now { font-size: 16px; font-weight: 600; color: var(--accent); }
.phasebar .hint { font-size: 12px; }

.log { max-height: 200px; overflow: auto; font-size: 12px; color: var(--muted); line-height: 1.9; }
.log div { padding: 2px 0; border-bottom: 1px solid rgba(232, 230, 255, 0.06); }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.tabs .tab {
  padding: 7px 14px; font-size: 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid rgba(232, 230, 255, 0.16); color: var(--muted); white-space: nowrap;
}
.tabs .tab.on { border-color: var(--accent); color: var(--accent); background: rgba(240, 180, 90, 0.1); }

table.list { width: 100%; border-collapse: collapse; font-size: 12px; }
table.list th { color: var(--muted); font-weight: 400; text-align: left; padding: 8px 6px; border-bottom: 1px solid rgba(232, 230, 255, 0.12); }
table.list td { padding: 8px 6px; border-bottom: 1px solid rgba(232, 230, 255, 0.07); vertical-align: middle; }
table.list tr:hover td { background: rgba(124, 92, 224, 0.08); }

.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(18, 10, 51, 0.96); border: 1px solid var(--accent); color: var(--text);
  padding: 10px 18px; border-radius: 10px; font-size: 13px; z-index: 99; max-width: 90vw;
}

.mask {
  position: fixed; inset: 0; background: rgba(6, 3, 18, 0.7); display: flex;
  align-items: center; justify-content: center; padding: 20px; z-index: 90;
}
.dialog { width: 100%; max-width: 360px; background: #1B1140; border: 1px solid rgba(124, 92, 224, 0.35); border-radius: 14px; padding: 18px; }
.dialog h3 { margin: 0 0 12px; font-size: 15px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }

.script-card {
  border: 1px solid rgba(124, 92, 224, 0.5); border-radius: 12px; padding: 12px;
  background: rgba(0, 0, 0, 0.22); cursor: pointer;
}
.script-card.on { border-color: var(--accent); background: rgba(240, 180, 90, 0.08); }
.script-card .t { font-size: 15px; font-weight: 600; }
.script-card .d { font-size: 11px; color: var(--muted); margin-top: 4px; }

.identity {
  border-radius: 16px; border: 1px solid rgba(240, 180, 90, 0.5); padding: 20px;
  text-align: center; background: linear-gradient(160deg, rgba(124, 92, 224, 0.25), rgba(18, 10, 51, 0.9));
}
.identity .role { font-size: 30px; letter-spacing: 4px; color: var(--accent); }
.identity .camp { font-size: 12px; color: var(--muted); margin-top: 6px; }

.stage-body { background: transparent !important; }
.stage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stage-seat {
  background: rgba(18, 10, 51, 0.85); border: 1px solid rgba(124, 92, 224, 0.6);
  border-radius: 10px; padding: 10px 12px; position: relative;
}
.stage-seat .nick { font-size: 16px; }
.stage-seat .role { font-size: 13px; color: var(--accent); }
.stage-seat.dead { opacity: 0.45; }
.stage-seat.speaking { border-color: var(--accent); }

.footnote { text-align: center; font-size: 11px; color: var(--muted); margin-top: 18px; }

/* 管理后台 */
.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 20px 48px; }
.admin-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid rgba(124, 92, 224, 0.35); }
.admin-head .name { font-size: 20px; letter-spacing: 2px; }
.admin-head .sub { font-size: 12px; color: var(--muted); }

.table-wrap {
  width: 100%; overflow-x: auto;
  scrollbar-width: thin; scrollbar-color: rgba(124, 92, 224, 0.5) transparent;
}
.table-wrap::-webkit-scrollbar { height: 8px; width: 8px; }
.table-wrap::-webkit-scrollbar-track { background: transparent; }
.table-wrap::-webkit-scrollbar-thumb { background: rgba(124, 92, 224, 0.5); border-radius: 999px; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: rgba(124, 92, 224, 0.75); }
.table-wrap::-webkit-scrollbar-button { width: 0; height: 0; display: none; }
table.table { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 760px; }
table.table th {
  color: var(--muted); font-weight: 400; text-align: left; padding: 10px 8px;
  border-bottom: 1px solid rgba(232, 230, 255, 0.14); white-space: nowrap;
}
table.table td { padding: 10px 8px; border-bottom: 1px solid rgba(232, 230, 255, 0.07); vertical-align: middle; }
table.table tbody tr:hover td { background: rgba(124, 92, 224, 0.08); }
table.table td .btn { margin: 2px 2px 2px 0; }

/* 选手库表格（线上版排布） */
.card.pcard {
  padding: 0; overflow: hidden; background: #241456;
  border-color: rgba(124, 92, 224, 0.4);
}
table.table.pdt { min-width: 0; width: 100%; font-size: 13px; table-layout: auto; }
table.table.pdt th.c-player { width: 21%; min-width: 180px; }
table.table.pdt th.c-bind { width: 15%; min-width: 120px; }
table.table.pdt th.c-account { width: 12%; }
table.table.pdt th.c-status { width: 7%; min-width: 66px; }
table.table.pdt th.c-games { width: 7%; }
table.table.pdt th.c-remark { width: 7%; }
table.table.pdt th.c-time { width: 9%; }
table.table.pdt th.c-ops { width: 1%; white-space: nowrap; }
table.table.pdt th {
  padding: 14px 14px; color: #A99FE0; font-size: 12px; letter-spacing: 1px;
  background: rgba(124, 92, 224, 0.16); border-bottom: 1px solid rgba(124, 92, 224, 0.35);
}
table.table.pdt td { padding: 14px 14px; border-bottom: 1px solid rgba(232, 230, 255, 0.06); }
table.table.pdt th:first-child, table.table.pdt td:first-child { padding-left: 22px; }
table.table.pdt tbody tr:hover td,
table.table.pdt tbody td:hover { background: transparent; }
table.table.pdt tbody tr:last-child td { border-bottom: none; }

.pcell { display: flex; align-items: center; gap: 10px; }
.pavatar {
  width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(240, 180, 90, 0.35); background: #2A1B5E;
}
.pinitial {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; color: var(--accent);
  background: radial-gradient(circle at 40% 35%, #4B2FA0, #241455);
}
.pname { font-size: 14px; letter-spacing: 1px; color: var(--text); white-space: nowrap; }
.psub { margin-top: 3px; font-size: 11px; color: #C8A15E; white-space: nowrap; }
.pbindavatar {
  width: 26px; height: 26px; flex: none; border-radius: 50%; object-fit: cover;
  border: 1px solid rgba(240, 180, 90, 0.35); background: #2A1B5E;
  display: inline-flex; align-items: center; justify-content: center; font-size: 11px; color: var(--accent);
}
.pbindname { font-size: 13px; color: var(--text); white-space: nowrap; }

.pops { display: grid; grid-template-columns: repeat(3, max-content); gap: 8px; }
.btn.pill {
  display: inline-flex; align-items: center; gap: 6px; margin: 0;
  padding: 6px 12px; border-radius: 8px; font-size: 12px;
  border: 1px solid rgba(124, 92, 224, 0.45); background: rgba(28, 16, 68, 0.55); color: #DCD7FF;
}
.btn.pill svg { width: 14px; height: 14px; opacity: 0.8; }
.btn.pill:hover { border-color: var(--accent); color: var(--text); }
.btn.pill.danger { color: #FF9C8C; border-color: rgba(214, 80, 60, 0.55); }
.btn.only-narrow { display: none; }

.pfoot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-top: 1px solid rgba(124, 92, 224, 0.28);
  background: rgba(16, 8, 40, 0.35); flex-wrap: wrap;
}
.pfoot-right { display: inline-flex; align-items: center; gap: 8px; }
.pfoot .psize { width: 84px; padding: 6px 8px; font-size: 12px; }

/* 选手库自适应：窄屏收窄留白与按钮，隐藏次要列，避免横向溢出 */
@media (max-width: 1180px) {
  table.table.pdt th, table.table.pdt td { padding: 12px 10px; }
  .pops { grid-template-columns: repeat(2, max-content); gap: 6px; }
  .btn.pill { padding: 5px 10px; font-size: 11.5px; }
  .pavatar { width: 38px; height: 38px; }
  .pbindavatar { width: 22px; height: 22px; }
  .pfoot { padding: 12px; }
}
/* 逐列收缩：每 80px 只让一列退出，依次是 备注 → 参赛 → 创建时间 → 账号 → 状态 → 飞书 */
@media (max-width: 1200px) {
  table.table.pdt th:nth-child(6), table.table.pdt td:nth-child(6) { display: none; }
}
@media (max-width: 1120px) {
  table.table.pdt th:nth-child(5), table.table.pdt td:nth-child(5) { display: none; }
}
@media (max-width: 1040px) {
  table.table.pdt th:nth-child(7), table.table.pdt td:nth-child(7) { display: none; }
  .pfoot-right .hint { display: none; }
  .pfoot .psize { width: 72px; }
}
@media (max-width: 960px) {
  table.table.pdt th:nth-child(2), table.table.pdt td:nth-child(2) { display: none; }
  table.table.pdt th.c-player { width: 34%; min-width: 0; }
}
@media (max-width: 880px) {
  table.table.pdt th:nth-child(3), table.table.pdt td:nth-child(3) { display: none; }
  table.table.pdt th.c-player { width: 40%; min-width: 0; }
  table.table.pdt th.c-bind { width: 30%; min-width: 0; }
}
/* 窄屏：只剩「选手 / 操作」，按钮两列，筛选栏单行 */
@media (max-width: 800px) {
  table.table.pdt th:nth-child(4), table.table.pdt td:nth-child(4) { display: none; }
  table.table.pdt th.c-player { width: 44%; min-width: 0; }
  table.table.pdt th, table.table.pdt td { padding: 12px 10px; }
  .btn.only-narrow { display: inline-flex; }
  /* 顶部筛选栏：一行放不下时自动折成两行 */
  #pane-players > .card:first-child .row { flex-wrap: wrap !important; gap: 8px !important; }
  #playerKeyword { flex: 1 1 200px; min-width: 0; max-width: 240px !important; padding: 9px 10px; }
  #pane-players > .card:first-child .btn { white-space: nowrap; padding: 8px 10px; font-size: 12px; flex: none; }
  .pops { grid-template-columns: repeat(2, max-content); gap: 6px; }
  .pfoot { padding: 12px; }
  .pfoot .psize { width: 64px; }
  table.table.pdt th:first-child, table.table.pdt td:first-child { padding-left: 20px; }
}
/* 最窄：只留「选手 / 操作」两列 */
@media (max-width: 700px) {
  table.table.pdt th.c-player { width: 52%; min-width: 0; }
  table.table.pdt th.c-ops { width: 48%; }
  table.table.pdt th, table.table.pdt td { padding: 12px 8px; }
  table.table.pdt th:first-child, table.table.pdt td:first-child { padding-left: 20px; }
}
@media (max-width: 520px) {
  /* 最窄后台表：只保留首列与操作列 */
  #pane-admins table.table th:nth-child(3), #pane-admins table.table td:nth-child(3) { display: none; }
  .pfoot { flex-direction: column; align-items: flex-start; gap: 8px; }
  .pfoot-right { width: 100%; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
  .pfoot .btn { padding: 5px 8px; font-size: 12px; }
  .pfoot .psize { width: 56px; padding: 5px 4px; }
  .pops { gap: 5px; }
  .btn.pill { padding: 5px 8px; font-size: 11px; gap: 4px; }
  .btn.pill svg { width: 12px; height: 12px; }
  .pavatar { width: 38px; height: 38px; }
  .pname { font-size: 13px; }
}

/* 其余后台表格复用逐列收缩：始终保留首列与「操作」列 */
@media (max-width: 1100px) {
  #pane-rooms table.table th:nth-child(6), #pane-rooms table.table td:nth-child(6) { display: none; }
}
@media (max-width: 1000px) {
  #pane-rooms table.table th:nth-child(5), #pane-rooms table.table td:nth-child(5) { display: none; }
  #pane-permissions table.table th:nth-child(3), #pane-permissions table.table td:nth-child(3) { display: none; }
  #pane-presets table.table th:nth-child(3), #pane-presets table.table td:nth-child(3) { display: none; }
  #pane-admins table.table th:nth-child(3), #pane-admins table.table td:nth-child(3) { display: none; }
}
@media (max-width: 900px) {
  #pane-rooms table.table th:nth-child(4), #pane-rooms table.table td:nth-child(4) { display: none; }
  #pane-permissions table.table th:nth-child(4), #pane-permissions table.table td:nth-child(4) { display: none; }
  #pane-presets table.table th:nth-child(2), #pane-presets table.table td:nth-child(2) { display: none; }
  #pane-admins table.table th:nth-child(4), #pane-admins table.table td:nth-child(4) { display: none; }
}
@media (max-width: 820px) {
  #pane-rooms table.table th:nth-child(7), #pane-rooms table.table td:nth-child(7) { display: none; }
  /* 逐列收缩后不再需要横向滚动 */
  table.table:not(.pdt) { min-width: 0; }
}
@media (max-width: 740px) {
  #pane-rooms table.table th:nth-child(3), #pane-rooms table.table td:nth-child(3) { display: none; }
  #pane-permissions table.table th:nth-child(2), #pane-permissions table.table td:nth-child(2) { display: none; }
  #pane-admins table.table th:nth-child(2), #pane-admins table.table td:nth-child(2) { display: none; }
  #pane-admins table.table th:nth-child(5), #pane-admins table.table td:nth-child(5) { display: none; }
}
@media (max-width: 660px) {
  #pane-rooms table.table th:nth-child(2), #pane-rooms table.table td:nth-child(2) { display: none; }
}
/* 房间筛选：窄屏固定两行 —— 第一行 状态 + 起始日期 + 结束日期，第二行 房间码 + 对局ID + 查询 + 重置 */
@media (max-width: 760px) {
  #pane-rooms > .card:first-child .row {
    display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 8px;
  }
  #roomStatus  { grid-column: span 8; max-width: none !important; }
  #roomRangeWrap { grid-column: span 16; min-width: 0; max-width: none !important; }
  #roomRange { max-width: none !important; }
  #roomCode    { grid-column: span 7; max-width: none !important; }
  #roomGameId  { grid-column: span 9; max-width: none !important; }
  #roomQuery   { grid-column: span 4; }
  #roomReset   { grid-column: span 4; }
  #pane-rooms .btn { padding: 9px 4px; font-size: 12px; }
}
/* 日期范围选择：单框 + 浮层日历 */
.date-range { position: relative; flex: 0 1 290px; min-width: 220px; }
#roomRange { width: 100%; max-width: none !important; cursor: pointer; }
.date-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  width: 300px; max-width: 92vw; box-sizing: border-box; padding: 12px;
  background: #241456; border: 1px solid rgba(124,92,224,.55); border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
}
.date-pop-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.date-pop-head span { font-size: 14px; font-weight: 600; color: #E8E6FF; }
.dp-nav {
  width: 28px; height: 28px; border: 1px solid rgba(124,92,224,.5); border-radius: 8px;
  background: transparent; color: #E8E6FF; cursor: pointer; font-size: 15px; line-height: 1;
}
.dp-quick { display: flex; gap: 6px; margin-bottom: 8px; }
.dp-quick button {
  flex: 1; padding: 5px 0; border: 1px solid rgba(124,92,224,.45); border-radius: 8px;
  background: transparent; color: rgba(232,230,255,.8); font-size: 12px; cursor: pointer;
}
.dp-week { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 2px; }
.dp-week span { text-align: center; font-size: 11px; color: rgba(232,230,255,.5); padding: 3px 0; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-day {
  height: 34px; border: none; border-radius: 8px; background: transparent;
  color: #E8E6FF; font-size: 13px; cursor: pointer; padding: 0;
}
.dp-day:hover { background: rgba(124,92,224,.35); }
.dp-day.in-range { background: rgba(240,180,90,.14); }
.dp-day.edge-start, .dp-day.edge-end { background: #F0B45A; color: #2A1B5E; font-weight: 700; }
.dp-day.is-today { box-shadow: inset 0 0 0 1px rgba(240,180,90,.65); }
.date-pop-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }

/* 贴片预设：显示选项固定每行三个，多余项自动换到下一行 */
#pane-presets > .card:first-child .row {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: center;
}
#presetName { grid-column: 1 / -1; max-width: none !important; }
#pane-presets > .card:first-child .row > label.chip { justify-content: center; }
#presetAdd { grid-column: 1 / -1; justify-self: start; }

/* 贴片预设：窄屏同样每行三个 —— 第一行 预设名称，后面按三列排布 */
@media (max-width: 760px) {
  #pane-presets > .card:first-child .row {
    display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 8px; align-items: center;
  }
  #presetName { grid-column: span 24; max-width: none !important; }
  #pane-presets > .card:first-child .row > label.chip:nth-child(2) { grid-column: span 8; justify-content: center; }
  #pane-presets > .card:first-child .row > label.chip:nth-child(3) { grid-column: span 8; justify-content: center; }
  #pane-presets > .card:first-child .row > label.chip:nth-child(4) { grid-column: span 8; justify-content: center; }
  #pane-presets > .card:first-child .row > label.chip:nth-child(5) { grid-column: span 8; justify-content: center; }
  #presetAdd { grid-column: 1 / -1; justify-self: start; }
}

/* 后台表单弹窗 */
.dialog.wide { max-width: 560px; padding: 22px; }
.dlghead { position: relative; margin-bottom: 18px; }
.dlgtitle { font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.dlgsub { margin-top: 6px; font-size: 12px; color: var(--muted); }
.dlgclose {
  position: absolute; right: 0; top: 0; width: 26px; height: 26px; line-height: 24px; text-align: center;
  border-radius: 50%; color: var(--muted); cursor: pointer; background: transparent; border: none; font-size: 16px;
}
.dlgclose:hover { color: var(--text); }
.dlgfield { margin-bottom: 14px; }
.dlglabel { display: block; margin-bottom: 6px; font-size: 13px; color: #CFC8F2; }
.dlginput { width: 100%; }
.dlginput:disabled { opacity: 0.6; cursor: not-allowed; }
.dlgfoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.dlgwho { display: flex; align-items: center; gap: 12px; padding: 4px 0 14px; border-bottom: 1px solid rgba(232, 230, 255, 0.1); }
.dlgbody { padding: 6px 0 2px; }
.dlgrow {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  padding: 9px 0; border-bottom: 1px solid rgba(232, 230, 255, 0.06); font-size: 13px;
}
.dlgrow:last-child { border-bottom: none; }
.dlgk { color: var(--muted); flex: none; }
.dlgv { color: var(--text); text-align: right; word-break: break-all; }

@media (max-width: 640px) {
  .wrap { padding: 14px 12px 40px; }
  .admin-head .name { font-size: 16px; }
}

/* 测试模式：品牌栏 logo 连点 5 次开启，页面右上角常驻标识 */
.test-badge {
  position: fixed; right: 12px; top: 12px; z-index: 88;
  background: rgba(192, 57, 43, 0.92); color: #fff; font-size: 12px;
  padding: 4px 10px; border-radius: 999px; letter-spacing: 1px;
  border: 1px solid rgba(255, 255, 255, 0.35); pointer-events: none;
}
body.test-mode .brandbar img { outline: 2px dashed rgba(192, 57, 43, 0.8); outline-offset: 2px; }

/* 历史房间分组 */
.hgroup { margin-top: 10px; }
.hgroup .gtitle { font-size: 12px; color: var(--muted); letter-spacing: 1px; margin: 8px 0 4px; }
.hgroup .gtitle b { color: var(--accent); font-weight: 600; }
.badge { display: inline-block; font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(232, 230, 255, 0.28); color: var(--muted); }
.badge.run { border-color: rgba(240, 180, 90, 0.6); color: var(--accent); background: rgba(240, 180, 90, 0.1); }
.badge.end { border-color: rgba(232, 230, 255, 0.24); }
.badge.tour { border-color: rgba(124, 92, 224, 0.75); color: #b9a7ff; }
.badge.test { border-color: rgba(192, 57, 43, 0.7); color: #ff8b7d; }

/* 叫号条 */
.callbar {
  border: 1px solid rgba(240, 180, 90, 0.5); background: rgba(240, 180, 90, 0.08);
  border-radius: 12px; padding: 10px 14px; margin-bottom: 12px;
}
.callbar .big { font-size: 22px; color: var(--accent); font-weight: 600; letter-spacing: 2px; }

/* 复盘按天折叠 */
.dayblock { border: 1px solid rgba(124, 92, 224, 0.35); border-radius: 12px; margin-bottom: 8px; overflow: hidden; }
.dayblock > .dhead {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px; cursor: pointer;
  background: rgba(124, 92, 224, 0.12); font-size: 13px;
}
.dayblock > .dhead .caret { color: var(--accent); transition: transform 0.15s; }
.dayblock.open > .dhead .caret { transform: rotate(90deg); }
.dayblock > .dbody { display: none; padding: 6px 14px 10px; }
.dayblock.open > .dbody { display: block; }
.dayblock .dbody div { padding: 3px 0; font-size: 12px; color: var(--muted); border-bottom: 1px solid rgba(232, 230, 255, 0.06); }

/* ============ VI：紫夜金（复刻线上品牌稿） ============ */

/* 品牌封面：金环狼头标 + 发光字标 + 双入口 */
.splash {
  position: relative; min-height: 100svh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 56px 20px 28px; overflow: hidden;
}
.splash::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(1.6px 1.6px at 18% 22%, rgba(255, 255, 255, 0.85), transparent 60%),
    radial-gradient(1.4px 1.4px at 74% 16%, rgba(232, 230, 255, 0.7), transparent 60%),
    radial-gradient(1.8px 1.8px at 86% 62%, rgba(240, 180, 90, 0.75), transparent 60%),
    radial-gradient(1.2px 1.2px at 32% 74%, rgba(255, 255, 255, 0.6), transparent 60%),
    radial-gradient(1.2px 1.2px at 56% 86%, rgba(232, 230, 255, 0.45), transparent 60%),
    radial-gradient(1.4px 1.4px at 8% 54%, rgba(155, 133, 245, 0.7), transparent 60%);
  opacity: 0.85;
}
.splash-inner { position: relative; width: 100%; max-width: 392px; text-align: center; }
.splash-mark {
  width: 188px; height: 188px; border-radius: 50%; object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(124, 92, 224, 0.55)) drop-shadow(0 0 6px rgba(240, 180, 90, 0.45));
}
.splash-title {
  margin: 20px 0 0; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(34px, 10vw, 46px); letter-spacing: 8px; color: #FFFFFF;
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.45),
    0 0 22px rgba(155, 133, 245, 0.85),
    0 0 46px rgba(124, 92, 224, 0.65);
}
.splash-sub { margin-top: 12px; font-size: 12px; letter-spacing: 6px; color: var(--muted); }
.splash-tag { margin-top: 12px; }
.splash-tag:has(.chip:empty), .splash-tag .chip:empty { display: none; }
.splash-extra { margin-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 12px; }
.splash-extra .custom-field { display: inline-flex; align-items: baseline; gap: 5px; font-size: 11px; color: var(--muted); }
.splash-extra .custom-field b { color: var(--violet-soft); font-weight: 600; }
.splash-actions { margin-top: 34px; display: flex; flex-direction: column; gap: 12px; }
.entry {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-decoration: none; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid var(--line-soft); background: rgba(255, 255, 255, 0.05);
  color: var(--text); transition: 0.18s; width: 100%;
}
.entry b { font-size: 16px; letter-spacing: 2px; font-weight: 600; flex: none; }
.entry span { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry:hover { border-color: var(--accent); transform: translateY(-1px); }
.entry.primary {
  background: linear-gradient(180deg, #F6C877, var(--accent)); color: #2A1B5E;
  border-color: rgba(240, 180, 90, 0.9); box-shadow: 0 8px 24px rgba(240, 180, 90, 0.22);
}
.entry.primary span { color: rgba(42, 27, 94, 0.72); }
.splash-foot { position: relative; margin-top: 28px; font-size: 11px; color: var(--muted); letter-spacing: 1px; text-align: center; }
.splash-foot .slogan { letter-spacing: 4px; font-size: 13px; color: var(--text); opacity: 0.82; }
.splash-foot .copyright { margin-top: 8px; font-size: 10px; letter-spacing: 1px; color: var(--muted); opacity: 0.55; }

/* 后台登录：沿用封面（大圆标 + 发光字标 + slogan），表单收进一张卡片 */
.authlogin .authcard { margin: 26px auto 0; }
.authlogin .splash-foot { margin-top: 24px; }
.authlogin .auth-brand {
  flex: none; display: flex; flex-direction: column; align-items: center;
  text-align: center;
}

/* 手机端按屏幕尺寸自适应：尺寸随视口高度收缩，内容超出时整页可滚 */
.authlogin { overflow-y: auto; padding: clamp(18px, 5vh, 56px) 16px clamp(14px, 3vh, 28px); justify-content: safe center; }
.authlogin .authcard { margin-top: clamp(16px, 3vh, 26px); padding: clamp(16px, 2.4vh, 22px); }
.authlogin .lfield { margin: clamp(10px, 1.6vh, 18px) 0 6px; }
.authlogin .linput { padding: clamp(10px, 1.5vh, 13px) 13px; }
.authlogin .lbtn { margin-top: clamp(14px, 2vh, 22px); padding: clamp(12px, 1.7vh, 15px); }
.authlogin .splash-foot { margin-top: clamp(14px, 2.4vh, 24px); }
.authlogin .splash-foot .slogan { letter-spacing: 1px; font-size: clamp(10px, 2.9vw, 12px); }

/* 矮屏手机（≤700px 高）进一步压缩，保证一屏放得下表单 */
@media (max-width: 899px) and (max-height: 700px) {
  .authlogin { justify-content: flex-start; padding: 14px 16px 12px; }
  .authlogin .authcard { margin-top: 12px; padding: 14px 14px 16px; }
  .authlogin .lfield { margin: 9px 0 5px; }
  .authlogin .linput { padding: 9px 12px; }
  .authlogin .lbtn { margin-top: 12px; padding: 12px; }
  .authlogin .splash-foot { margin-top: 12px; }
}

.authcard {
  width: 100%; max-width: 392px; margin: 28px auto 0; padding: 22px;
  text-align: left;
}
.authcard h2 { margin: 0; font-size: 22px; letter-spacing: 4px; text-align: center; }
.lhint { margin: 8px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.lfield { margin: 18px 0 7px; text-align: left; font-size: 12px; letter-spacing: 1px; color: var(--text); }
.linput {
  width: 100%; padding: 13px 14px; border-radius: 10px;
  border: 1px solid rgba(124, 92, 224, 0.45); background: rgba(18, 10, 51, 0.55);
  color: var(--text); font-family: var(--font); font-size: 14px; outline: none;
}
.linput::placeholder { color: rgba(167, 159, 208, 0.7); }
.linput:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(240, 180, 90, 0.14); }
.lbtn {
  width: 100%; margin-top: 22px; padding: 15px; border: none; border-radius: 10px;
  background: linear-gradient(180deg, #F6C877, var(--accent)); color: #2A1B5E;
  font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: 3px; cursor: pointer;
}
.lbtn:active { transform: translateY(1px); }
.lbtn.secondary {
  background: rgba(124, 92, 224, 0.16);
  border: 1px solid rgba(124, 92, 224, 0.55);
  color: #E9E4FF;
  box-shadow: none;
}
.lbtn.secondary:hover { background: rgba(124, 92, 224, 0.26); }
.staff-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 20px 0 2px; color: var(--muted); font-size: 11px; letter-spacing: 1px;
}
.staff-divider::before, .staff-divider::after {
  content: ''; flex: 1; height: 1px; background: rgba(167, 159, 208, 0.22);
}
@media (max-width: 420px) {
  .authcard { padding: 18px 16px 20px; }
  .authcard h2 { font-size: 20px; letter-spacing: 3px; }
  .lbtn.secondary { margin-top: 10px; }
  .staff-divider { margin-top: 16px; }
}

/* 后台登录：桌面端左右排布（左品牌、右登录卡），整体在视口内居中，品牌与卡片同轴对齐 */
@media (min-width: 900px) {
  .authlogin {
    display: grid;
    grid-template-columns: max-content minmax(0, 400px);
    align-content: center; align-items: center; justify-content: center;
    column-gap: clamp(56px, 8vw, 120px);
    padding: 48px 56px;
  }
  .authlogin .authcard { margin: 0; width: 400px; max-width: 400px; flex: none; }
  .authlogin .splash-foot { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; }
}

/* 登录态页面：与品牌页共用 1120px 栅格，去掉后台底部留白 */
.auth-mode .wrap { max-width: 1120px; padding: 0 20px; min-height: 100svh; }
.auth-mode .splash.authlogin { min-height: 100svh; }
@media (max-width: 899px) {
  .auth-mode .wrap { padding: 0; }
}

/* 窄屏 PC：820–899px 仍保持左右双栏，避免退回单列造成品牌位置跳变 */
@media (min-width: 820px) and (max-width: 899px) {
  .auth-mode .wrap { padding: 0 20px; }
  .authlogin {
    display: grid;
    grid-template-columns: max-content minmax(0, 360px);
    align-content: center; align-items: center; justify-content: center;
    column-gap: 40px;
    padding: 32px 32px;
  }
  .authlogin .authcard { width: 360px; max-width: 360px; margin: 0; padding: 20px; flex: none; }
  .authlogin .splash-foot { position: absolute; left: 0; right: 0; bottom: 18px; margin: 0; }
}

/* 品牌锁定组件见文件末尾：统一由 --brand-size 推导全部尺寸 */

/* 赛事权限：飞书通讯录用户选择器 */
.upick { position: relative; max-width: 360px; margin-top: 12px; }
.upick-label { margin-bottom: 6px; font-size: 12px; letter-spacing: 1px; color: var(--muted); }
.upick-input {
  width: 100%; padding: 11px 12px; border-radius: 8px; outline: none;
  border: 1px solid rgba(124, 92, 224, 0.5); background: rgba(18, 10, 51, 0.55);
  color: var(--text); font-family: var(--font); font-size: 14px;
}
.upick-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(240, 180, 90, 0.18); }
.upick-list {
  margin-top: 6px; max-height: 264px; overflow: auto; padding: 6px;
  background: #1B1140; border: 1px solid rgba(124, 92, 224, 0.5); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(6, 3, 20, 0.45);
}
.upick-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.upick-item:hover { background: rgba(124, 92, 224, 0.18); }
.upick-item.on {
  background: linear-gradient(90deg, rgba(124, 92, 224, 0.45), rgba(124, 92, 224, 0.26));
  border: 1px solid rgba(240, 180, 90, 0.5);
}
.upick-avatar { width: 34px; height: 34px; flex: none; border-radius: 50%; object-fit: cover; background: #2A1B5E; }
.upick-initial {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; color: var(--accent);
  background: radial-gradient(circle at 40% 35%, #4B2FA0, #241455);
  border: 1px solid rgba(240, 180, 90, 0.35);
}
.upick-name { font-size: 14px; letter-spacing: 1px; color: var(--accent); }
.upick-dept { margin-top: 2px; font-size: 11px; color: var(--muted); }
.upick-empty { padding: 10px; font-size: 12px; color: var(--muted); }

/* 身份卡上的角色插画（线上角色图） */
.identity .roleart {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover; display: block;
  margin: 0 auto 10px; border: 1px solid rgba(240, 180, 90, 0.55);
  box-shadow: 0 0 22px rgba(124, 92, 224, 0.45);
}

@media (max-height: 700px) {
  .splash-mark { width: 140px; height: 140px; }
  .splash-actions { margin-top: 22px; }
}

/* ============ DB 赛事运营工作台 ============ */
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.overview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-head { flex-wrap: wrap; }
.admin-tabs { flex-wrap: wrap; overflow: visible; }
.admin-tabs .tab.locked { opacity: .4; cursor: not-allowed; filter: grayscale(.35); }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-head h2 { margin-bottom: 10px; }
.link-gold { color: var(--accent); text-decoration: none; cursor: pointer; }
.link-gold:hover { text-decoration: underline; }

.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.kpi-card {
  border: 1px solid rgba(124, 92, 224, 0.42); border-radius: 12px; padding: 12px 14px;
  background: linear-gradient(160deg, rgba(124, 92, 224, 0.16), rgba(18, 10, 51, 0.32));
  min-width: 0;
}
.kpi-label { font-size: 11px; letter-spacing: 1px; color: var(--muted); }
.kpi-value { margin-top: 4px; font-size: 24px; line-height: 1.2; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.kpi-sub { margin-top: 2px; font-size: 10px; color: rgba(167, 159, 208, 0.7); }

.ops-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 12px; }
.compact-list { display: flex; flex-direction: column; gap: 6px; }
.compact-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  border: 1px solid rgba(124, 92, 224, 0.26); border-radius: 9px;
  background: rgba(18, 10, 51, 0.28); color: var(--text); text-align: left;
  font-family: var(--font); font-size: 12px; cursor: pointer;
}
.compact-row:hover { border-color: rgba(240, 180, 90, 0.65); }
.compact-row.static { cursor: default; }
.compact-row.static:hover { border-color: rgba(124, 92, 224, 0.26); }
.compact-main { display: flex; align-items: center; gap: 6px; min-width: 0; flex-wrap: wrap; }
.compact-sub { flex: 1; min-width: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-right { flex: none; color: var(--muted); font-size: 11px; }
.compact-time { flex: none; width: 50px; color: var(--accent); }
.empty-line { padding: 12px 2px; color: var(--muted); font-size: 12px; }

.alert-list { display: flex; flex-direction: column; gap: 7px; }
.alert-item {
  display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border-radius: 8px;
  border: 1px solid rgba(124, 92, 224, 0.28); background: rgba(18, 10, 51, 0.28);
  color: var(--text); font-size: 12px;
}
.alert-item.warn { border-color: rgba(240, 180, 90, 0.5); background: rgba(240, 180, 90, 0.08); }
.alert-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; margin-top: 6px; }
.alert-item:not(.warn) .alert-dot { background: var(--violet-soft); }

.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.live-card {
  border: 1px solid rgba(124, 92, 224, 0.48); border-radius: 14px; padding: 14px;
  background: linear-gradient(165deg, rgba(124, 92, 224, 0.14), rgba(18, 10, 51, 0.48));
  transition: box-shadow 0.2s, border-color 0.2s;
}
.live-card.highlight { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(240, 180, 90, 0.22); }
.live-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.live-code { font-size: 22px; font-weight: 700; letter-spacing: 2px; color: var(--accent); }
.live-phase { font-size: 13px; color: var(--text); padding: 3px 9px; border-radius: 999px; border: 1px solid rgba(232, 230, 255, 0.18); white-space: nowrap; }
.live-sub { margin-top: 4px; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.live-stats > div { display: flex; flex-direction: column; gap: 1px; }
.live-stats .hint { font-size: 10px; }
.live-stats b { font-size: 15px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.live-supplement {
  margin-top: 10px; padding-top: 9px; border-top: 1px dashed rgba(232, 230, 255, 0.12);
  display: flex; flex-direction: column; gap: 4px; font-size: 12px;
}
.live-supplement > div { display: flex; align-items: baseline; gap: 8px; }
.live-label { color: var(--muted); font-size: 11px; min-width: 58px; }
.live-timer { color: var(--accent); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.live-call { margin-top: 8px; padding: 7px 9px; border-radius: 8px; background: rgba(240, 180, 90, 0.1); border: 1px solid rgba(240, 180, 90, 0.35); font-size: 12px; }
.live-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }

.schedule-table { min-width: 900px; }
.schedule-table td { vertical-align: top; }
.sched-status { width: 112px; max-width: 112px; padding: 5px 7px; font-size: 12px; }
.sched-note { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ops-list { display: flex; flex-direction: column; gap: 0; }
.ops-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(232, 230, 255, 0.08); }
.ops-item:last-child { border-bottom: none; }
.ops-marker {
  width: 8px; height: 8px; flex: none; margin-top: 8px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 3px rgba(240, 180, 90, 0.12);
}
.ops-body { flex: 1; min-width: 0; }
.ops-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ops-title { margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--text); }
.ops-content { margin-top: 4px; color: var(--text); font-size: 13px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }
.ops-actions { flex: none; display: flex; align-items: flex-start; gap: 4px; }
.ops-chip.handover { border-color: rgba(240, 180, 90, 0.55); color: var(--accent); }
.ops-chip.incident { border-color: rgba(214, 80, 60, 0.55); color: #FF9C8C; }
.ops-chip.decision { border-color: rgba(124, 92, 224, 0.7); color: var(--violet-soft); }
.ops-chip.result { border-color: rgba(34, 197, 94, 0.55); color: #74E29A; }
.ops-chip.note { border-color: rgba(232, 230, 255, 0.24); color: var(--muted); }
.ops-form { display: flex; flex-direction: column; gap: 10px; }
.ops-form .dlgfield { margin-bottom: 0; }
.ops-form textarea { resize: vertical; min-height: 108px; }
.ops-dialog { max-width: 600px; }

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ops-grid { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .schedule-table th:nth-child(6), .schedule-table td:nth-child(6) { display: none; }
}
@media (max-width: 960px) {
  .schedule-table th:nth-child(5), .schedule-table td:nth-child(5) { display: none; }
  .schedule-table { min-width: 720px; }
}
@media (max-width: 820px) {
  .schedule-table th:nth-child(4), .schedule-table td:nth-child(4) { display: none; }
  .schedule-table { min-width: 0; }
  .live-grid { grid-template-columns: 1fr; }
  .ops-actions { flex-direction: column; }
}
@media (max-width: 680px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-head { align-items: flex-start; }
  .admin-head { gap: 8px; }
  .admin-head .name { font-size: 16px; }
  .admin-head .sub { font-size: 11px; }
  .admin-head .btn.sm { padding: 5px 9px; font-size: 11.5px; }
  .admin-tabs { gap: 5px; }
  .admin-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .admin-tabs .tab { padding: 6px 3px; font-size: 12px; text-align: center; }
  .compact-sub { display: none; }
  .compact-row { align-items: flex-start; flex-wrap: wrap; }
  .compact-right { margin-left: auto; }
  .schedule-table th:nth-child(3), .schedule-table td:nth-child(3) { display: none; }
  .schedule-table { font-size: 12px; }
  .sched-note { display: none; }
}
@media (max-width: 520px) {
  .kpi-card { padding: 10px; }
  .kpi-value { font-size: 20px; }
  .live-code { font-size: 19px; }
  .live-stats { grid-template-columns: repeat(2, 1fr); }
  .ops-item { gap: 8px; }
  .ops-actions .btn { padding: 4px 6px; font-size: 11px; }
}

/* ============================================================
   品牌锁定组件（LOGO + 品牌名 + 副标题）
   用法：在品牌容器上加 class="brand-lockup"，只调 --brand-size 一个参数。
   其余字号、字距、间距、光学对齐全部由该参数按比例推导。
   ============================================================ */
:root { --brand-size: 200px; }
@media (max-width: 819px) {
  :root { --brand-size: clamp(112px, 24svh, 188px); }
}
@media (max-width: 819px) and (max-height: 700px) {
  :root { --brand-size: 140px; }
}
@media (max-width: 420px) {
  :root { --brand-size: 160px; }
}

.brand-lockup {
  width: clamp(320px, 35.4vw, 440px);
  max-width: 100%;
  display: flex; flex-direction: column; align-items: center;
  flex: none; margin: 0 auto; text-align: center;
}
.brand-lockup .splash-mark {
  width: var(--brand-size);
  height: var(--brand-size);
}
.brand-lockup .splash-title {
  margin: calc(var(--brand-size) * 0.11) 0 0;
  font-size: calc(var(--brand-size) * 0.27);
  letter-spacing: calc(var(--brand-size) * 0.05);
  white-space: nowrap;
}
.brand-lockup .splash-sub {
  margin-top: calc(var(--brand-size) * 0.07);
  font-size: calc(var(--brand-size) * 0.06);
  letter-spacing: calc(var(--brand-size) * 0.03);
}
.brand-lockup .splash-tag,
.brand-lockup .splash-extra {
  margin-top: calc(var(--brand-size) * 0.07);
}
.brand-lockup .splash-extra { justify-content: center; }

@media (min-width: 820px) {
  .brand-lockup {
    align-items: flex-start;
    text-align: left;
    margin: 0;
  }
  /* LOGO PNG 左右各有透明留白，文字以可见图形外缘为基点右移 */
  .brand-lockup .splash-title,
  .brand-lockup .splash-sub,
  .brand-lockup .splash-tag,
  .brand-lockup .splash-extra {
    transform: translateX(calc(var(--brand-size) * 0.06));
  }
  .brand-lockup .splash-extra { justify-content: flex-start; }
}

/* ============================================================
   页面左右结构：左侧固定品牌模板，右侧内容槽
   ============================================================ */
.stage {
  width: 100%; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 0;
}
.stage-brand {
  position: relative; flex: none;
  width: clamp(320px, 35.4vw, 440px); max-width: 100%;
  display: flex; flex-direction: column; align-items: flex-start;
}
.stage-brand .brand-lockup { width: 100%; max-width: 100%; }
.stage-content {
  flex: none; width: 400px; max-width: 400px;
  display: flex; flex-direction: column; justify-content: flex-start;
}
.stage-content-actions { justify-content: flex-end; align-self: stretch; }

@media (min-width: 820px) and (max-width: 899px) {
  .stage-brand { width: 320px; }
  .stage-content { width: 360px; max-width: 360px; }
}
@media (max-width: 819px) {
  .stage { flex-direction: column; align-items: center; gap: clamp(16px, 3vh, 26px); }
  .stage-brand { width: 100%; align-items: center; }
  .stage-content { width: 100%; max-width: 392px; }
  .stage-content-actions { justify-content: flex-start; }
  .stage .authcard { margin-top: 0; }
  .stage-content-actions .splash-actions { margin-top: 0; }
}



/* ===== 全站隐形滚动条（保留滚动能力，仅隐藏视觉） ===== */
html, body { scrollbar-width: none; -ms-overflow-style: none; }
html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; }
*::-webkit-scrollbar-track, *::-webkit-scrollbar-thumb, *::-webkit-scrollbar-corner { background: transparent !important; }