* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #162033;
  background: #f5f7fb;
}

/* ── Header ──────────────────────── */
.hero {
  padding: 14px 18px;
  color: #ffffff;
  background: linear-gradient(135deg, #172554, #7c3aed);
}
.hero h1 { margin: 0; font-size: clamp(28px, 8vw, 48px); }
.hero h1 span { display: block; margin-top: 6px; font-size: clamp(13px, 2.6vw, 20px); font-weight: 800; color: rgba(255,255,255,.72); letter-spacing: 0; }
.hero p { max-width: 860px; margin: 12px 0 0; line-height: 1.7; }

/* ── Nav tabs ────────────────────── */
.tabs {
  position: sticky; top: 0; z-index: 5;
  display: flex; gap: 8px; overflow-x: auto;
  padding: 10px 12px;
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid #e2e8f0;
}
.tabs a {
  flex: 0 0 auto;
  padding: 10px 12px; border-radius: 999px;
  color: #334155; background: #eef2ff;
  text-decoration: none; font-size: 14px; font-weight: 800;
}

/* ── Layout ──────────────────────── */
.layout {
  display: grid; gap: 10px;
  width: min(1400px, calc(100% - 20px));
  margin: 10px auto 16px;
}
.panel, .screen-panel {
  padding: 12px;
  border: 1px solid #dbe3ef; border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(15,23,42,0.06);
}
.section-head, .screen-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 8px;
}
h2, h3 { margin: 0; }

/* ── Badges ──────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  min-height: 28px; padding: 0 10px; border-radius: 999px;
  color: #1e40af; background: #dbeafe;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.badge.warn { color: #92400e; background: #fef3c7; }
.badge.danger { color: #991b1b; background: #fee2e2; }
.eyebrow { margin: 0 0 8px; color: #7c8aa5; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; }

/* ── Form ────────────────────────── */
label { display: grid; gap: 8px; margin-top: 12px; color: #475569; font-size: 14px; font-weight: 700; }
select, input {
  width: 100%; min-height: 44px; padding: 0 12px;
  border: 1px solid #cbd5e1; border-radius: 12px;
  font: inherit; background: #ffffff;
}
input:disabled, button:disabled { opacity: 0.55; cursor: not-allowed; }

/* ── Buttons ─────────────────────── */
button {
  min-height: 44px; margin-top: 14px; padding: 0 16px;
  border: 0; border-radius: 12px;
  font: inherit; font-weight: 800; cursor: pointer;
}
.primary { width: 100%; color: #ffffff; background: #4f46e5; }
.secondary { color: #ffffff; background: #0f766e; }
.ghost { margin-left: 8px; color: #991b1b; background: #fee2e2; }
.hint, .log-list { margin: 10px 0 0; color: #64748b; font-size: 13px; line-height: 1.7; }

/* ── Grid layouts ────────────────── */
.control-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-top: 14px;
}
.control-grid article {
  padding: 14px; border-radius: 14px; background: #f8fafc;
}
/* 评审提交状态：固定 6 列两行（11 人 → 6+5），格子宽大；监评提交状态：3 列一行 */
.control-grid .judge-col .submission-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.control-grid .sup-col .submission-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* 监评列纵向布局：监评在上、公示打分按钮贴底水平居中（与评审第二行水平，看完直接公示） */
.control-grid .sup-col { display: flex; flex-direction: column; }
.control-grid .sup-col #supervisorStatus { flex: 1; }
.control-grid .sup-col #btnShowResult { margin-top: auto; margin-left: auto; margin-right: auto; display: block; width: auto; }
/* 公示按钮点击反馈：按压缩小 + 公示成功绿色闪烁 */
.flow-btn:active { transform: scale(.94); }
#btnShowResult.result-flash {
  background: #16a34a !important; border-color: #22c55e !important; color: #fff !important;
  animation: resultPulse 0.5s ease;
}
@keyframes resultPulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); transform: scale(1); }
  50% { box-shadow: 0 0 0 12px rgba(34,197,94,0); transform: scale(1.08); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); transform: scale(1); }
}
.score-fields { display: grid; gap: 12px; margin-top: 14px; }

/* ── Status list ─────────────────── */
.status-list { display: grid; gap: 8px; }
.status-item {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 10px; border-radius: 10px; background: #ffffff;
}
.status-ok { color: #16a34a; }
.score-total, .status-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px; padding: 14px;
  border-radius: 14px; background: #f8fafc;
}
.score-total strong, .status-row strong { font-size: 22px; }

/* ── Ranking view controls ───────── */
.ranking-view-controls {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 12px;
  margin-top: 16px; padding: 12px 16px;
  background: #f8fafc; border-radius: 12px;
  border: 1px solid #e2e8f0;
}
.view-switch { display: flex; gap: 8px; }
.view-btn {
  padding: 8px 18px; border-radius: 8px; font-size: 14px; font-weight: 700;
  cursor: pointer; border: 2px solid #cbd5e1;
  background: #ffffff; color: #475569; transition: all .15s;
}
.view-btn.active {
  background: #172554; color: #ffffff; border-color: #172554;
}
.export-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Ranking table ───────────────── */
.ranking-table { margin-top: 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; }
th { color: #475569; background: #f8fafc; font-size: 13px; }

/* 分组排名块 */
.ranking-view-label {
  padding: 8px 12px; margin-bottom: 12px;
  background: #eff6ff; border-left: 4px solid #2563eb;
  border-radius: 0 8px 8px 0; font-size: 13px; font-weight: 700; color: #1e40af;
}
.no-total-rank-notice {
  display: inline-block; margin-left: 12px;
  color: #b45309; font-size: 12px; font-weight: 700;
}
.group-ranking-block {
  margin-bottom: 24px;
  border: 1px solid #e2e8f0; border-radius: 12px; overflow: hidden;
}
.group-ranking-header {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; background: #1e293b;
}
.group-id-tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: #facc15; color: #1e293b; font-size: 12px; font-weight: 900;
}
.group-id-tag.small { font-size: 11px; padding: 2px 8px; }
.group-count { color: #94a3b8; font-size: 13px; }
.group-ranking-block table { min-width: 900px; }
.group-ranking-block th { background: #f1f5f9; }
.row-incomplete td { color: #94a3b8; }
.score-final-text { color: #166534; font-weight: 900; }

/* ── Calculation detail ──────────── */
.calculation-detail {
  margin-top: 16px; padding: 16px; border-radius: 16px; background: #f8fafc;
}
.calculation-detail h3 { margin-bottom: 8px; }
.rank-group { margin: 0 0 12px; color: #475569; font-size: 13px; font-weight: 800; word-break: break-all; }
.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.calc-grid article { padding: 12px; border-radius: 12px; background: #ffffff; }
.calc-grid h4 { margin: 0 0 10px; }

/* ── Score chips ─────────────────── */
.score-chip {
  display: inline-flex; margin: 4px; padding: 6px 9px; border-radius: 999px;
  color: #334155; background: #e2e8f0; font-size: 12px; font-weight: 800;
}
.score-chip.removed-high { color: #991b1b; background: #fee2e2; }
.score-chip.removed-low { color: #92400e; background: #fef3c7; }
.score-chip.valid { color: #166534; background: #dcfce7; }
.score-chip.deduction { color: #7f1d1d; background: #fee2e2; }

/* ══════════════════════════════════
   监评端 — supervisor deduction panel
   ══════════════════════════════════ */
.sup-domain-badge {
  display: flex; gap: 10px; align-items: center;
  margin: 12px 0; padding: 10px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef2f2, #fff7ed);
  border: 2px solid #fca5a5;
}
.domain-tag {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  background: #dc2626; color: #fff; font-size: 15px; font-weight: 950;
  white-space: nowrap;
}
.domain-desc {
  font-size: 13px; color: #991b1b; font-weight: 700;
}

.deduction-categories { margin-top: 14px; }
.deduction-category {
  margin-bottom: 10px; padding: 0 12px;
  border-radius: 10px; background: #fef2f2;
  border: 1px solid #fecaca;
  overflow: hidden;
}
.deduction-category .cat-title {
  margin: 0; padding: 12px 4px;
  border-bottom: none;
  color: #991b1b; font-size: 15px; font-weight: 900;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  cursor: pointer; min-height: 48px;
  list-style: none; user-select: none;
}
.deduction-category .cat-title::-webkit-details-marker { display: none; }
.deduction-category .cat-title::before {
  content: "▸"; font-size: 16px; color: #b91c1c; transition: transform .2s;
}
.deduction-category[open] .cat-title::before { transform: rotate(90deg); }
.deduction-category .cat-title .cat-stat {
  font-size: 12px; font-weight: 700; color: #64748b; background: #fff;
  border: 1px solid #fecaca; border-radius: 999px; padding: 2px 10px;
}
.deduction-category .cat-body { padding-bottom: 12px; }
/* 扣分项响应式列数：iPad竖屏2列 / 宽屏3列 / 笔记本满屏4列（方便满屏操作扣分） */
.deduction-category .cat-body { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .deduction-category .cat-body { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1300px) { .deduction-category .cat-body { grid-template-columns: repeat(4, 1fr); } }
.cat-hint {
  margin-top: 10px; padding: 8px 12px;
  border-radius: 8px; background: #f8fafc;
  color: #64748b; font-size: 12px; font-weight: 700;
}

.deduction-item {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid #fee2e2;
}
.deduction-item:last-child { border-bottom: none; }
.deduction-item-info {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; gap: 2px;
}
.deduction-item-name {
  font-size: 13px; font-weight: 800; color: #1e293b;
  word-break: break-all;
}
.deduction-item-range {
  font-size: 11px; color: #b45309; font-weight: 700;
}
.deduction-item-input {
  width: 120px; min-width: 100px; flex-shrink: 0;
  height: 36px; padding: 0 10px;
  border: 2px solid #fca5a5; border-radius: 8px;
  font-size: 14px; font-weight: 900; text-align: center;
  color: #991b1b; background: #fff;
}
.deduction-item-input:focus {
  outline: none; border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
}
/* 特殊项"填写失误原因和扣分分值"：原因输入框 */
.deduction-reason-input {
  flex: 1; min-width: 0;
  height: 36px; padding: 0 10px;
  border: 2px solid #fca5a5; border-radius: 8px;
  font-size: 13px; color: #1e293b; background: #fff;
}
.deduction-reason-input:focus {
  outline: none; border-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.15);
}
/* 兜底填空：其他扣分（独立于分类，原因+分值一行） */
.deduction-other {
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
}
.deduction-other-title {
  font-size: 13px; font-weight: 950; color: #b45309;
  margin-bottom: 8px;
}
.deduction-other-title span { font-weight: 600; color: #d97706; font-size: 11px; }
.deduction-other-body {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 8px;
  align-items: center;
}

/* ══════════════════════════════════
   主控后台 — admin panel
   ══════════════════════════════════ */
.admin-login-row, .publisher-row {
  display: flex; gap: 12px; align-items: flex-end;
}
.admin-push-row {
  margin-top: 16px; padding: 16px;
  border-radius: 12px; background: #f8fafc;
}
.admin-push-row label { margin-top: 0; }
.publisher-row {
  margin-top: 16px; padding: 16px;
  border-radius: 12px; background: #fef3c7;
}

/* ══════════════════════════════════
   大屏嵌入 — bigscreen embed
   ══════════════════════════════════ */
.screen-panel {
  color: #f8fafc; background: #2f807b;
}
.screen-top p { margin: 0 0 8px; color: #fde68a; font-weight: 800; }
.screen-top strong { color: #facc15; }

.big-screen {
  width: 100%; aspect-ratio: 16/9;
  padding: 0; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.18); border-radius: 12px;
  background: #2f807b;
}
.big-screen.empty {
  display: grid; place-items: center;
  padding: 24px; color: #e0f2f1; font-size: 22px; text-align: center;
}
.big-screen.live-preview {
  display: grid; place-items: center;
  background: #050505;
  border-color: rgba(255,255,255,.1);
}
.big-screen.cloud-bigscreen-preview {
  padding: 0;
  background: #050505;
  border-color: rgba(255,255,255,.1);
}
.cloud-bigscreen-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #050505;
}
.live-preview-inner { text-align: center; color: rgba(255,255,255,.2); }
.live-preview-en {
  font-size: clamp(32px, 6vw, 76px);
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1;
}
.live-preview-cn {
  margin-top: 12px;
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 800;
}
.live-preview-note {
  margin-top: 24px;
  color: rgba(255,255,255,.28);
  font-size: 13px;
  font-weight: 700;
}

.screen-template {
  position: relative; height: 100%;
  padding: 20px 24px;
  background:
    radial-gradient(circle at 18% 24%, rgba(244,203,68,0.18), transparent 24%),
    radial-gradient(circle at 82% 62%, rgba(244,203,68,0.16), transparent 26%),
    #438b85;
}

.screen-header {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  gap: 24px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.screen-header-left h2 {
  color: #fff; font-size: clamp(20px, 2.8vw, 36px);
  font-weight: 950; line-height: 1; margin: 0;
  text-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
.screen-header-left p {
  margin: 0; color: rgba(255,255,255,0.5);
  font-size: clamp(10px, 1.2vw, 16px); font-weight: 700; letter-spacing: 0.08em;
}
.screen-header-right { text-align: right; }
.screen-header-right h2 {
  color: #facc15; font-size: clamp(18px, 2.4vw, 32px);
  font-weight: 950; line-height: 1; margin: 0;
}
.screen-header-right p {
  margin: 0; color: #fde68a; font-family: Georgia, serif;
  font-size: clamp(11px, 1.3vw, 18px); font-weight: 900; letter-spacing: 0.12em;
}

.screen-body {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 1fr) 200px;
  gap: 14px; margin-top: 10px;
}
.screen-left h3 { margin: 2px 0; color: #fff; font-size: 16px; }
.screen-meta { color: #e0f2f1; font-weight: 800; font-size: clamp(10px, 1vw, 14px); }
.control-preview-left { min-width: 0; overflow: hidden; }
.control-preview-name {
  color: #fff;
  font-size: clamp(30px, 5vw, 58px) !important;
  line-height: 1;
  margin: 10px 0 6px !important;
  font-weight: 950;
}
.control-preview-people {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 12px 0 10px;
  max-height: 154px;
  overflow: hidden;
}
.control-preview-person {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 5px 7px;
  border-radius: 7px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.14);
  color: #ecfeff;
  font-size: 11px;
  font-weight: 850;
}
.control-preview-person span {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.control-preview-person strong { color: #fef08a; font-size: 12px; }
.control-preview-person.supervisor strong { color: #fecaca; }

.screen-actions { padding: 12px 16px; }

/* Published contestant rows in bigscreen */
.pub-contestant-row {
  display: flex; align-items: center; gap: 12px;
  margin: 8px 0; padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
}
.pub-rank-badge {
  width: 40px; height: 40px; display: grid; place-items: center;
  border-radius: 50%;
  background: #facc15; color: #1e293b;
  font-size: 16px; font-weight: 950; flex-shrink: 0;
}
.pub-contestant-info { flex: 1; min-width: 0; }
.pub-contestant-info h3 { margin: 0; font-size: 16px; font-weight: 950; color: #fff; }
.pub-contestant-info span { font-size: 11px; }
.pub-score-block {
  text-align: center; flex-shrink: 0;
  padding: 6px 14px; border-radius: 8px;
  background: rgba(34,197,94,0.2);
  border: 1.5px solid rgba(34,197,94,0.5);
}
.pub-score-label {
  display: block; font-size: 10px; color: #86efac; font-weight: 800;
}
.pub-score-value {
  display: block; font-size: 20px; font-weight: 950; color: #fff;
}

.screen-score-panel {
  display: flex; flex-direction: column; gap: 6px;
  align-items: stretch;
}
.screen-score-panel .score-block {
  text-align: center; padding: 8px; border-radius: 8px;
}
.score-label {
  display: block; font-size: clamp(10px, 1vw, 12px);
  font-weight: 900; margin-bottom: 4px; color: rgba(0,0,0,0.7);
}
.score-value {
  display: block; font-size: clamp(20px, 3vw, 36px);
  font-weight: 950; line-height: 1; color: #1f2937;
}
.score-block.score-actual { background: #fde047; border: 3px solid #facc15; }
.score-block.score-deduction { background: #fca5a5; border: 3px solid #ef4444; }
.score-block.score-deduction .score-value { color: #7f1d1d; }
.score-block.score-final { background: #86efac; border: 3px solid #22c55e; }
.score-block.score-final .score-value { color: #166534; }
.final-score { color: #166534; font-size: clamp(20px, 3vw, 36px); font-weight: 950; }

@media (max-width: 760px) {
  .control-grid, .screen-body, .calc-grid { grid-template-columns: 1fr; }
  .deduction-item { flex-direction: column; align-items: stretch; }
  .deduction-item-input { width: 100%; }
  .ghost, .secondary { width: 100%; margin-left: 0; }
  .admin-login-row, .publisher-row { flex-direction: column; }
  .screen-template { padding: 12px; }
}

/* ── T28 现场流程控制面板 ──────────────── */
.flow-contestant-info {
  background: linear-gradient(135deg,#0d3b35,#1a5c52);
  border-radius: 12px; padding: 14px 18px; margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.15);
}
.flow-name { font-size: clamp(18px,2.2vw,26px); font-weight: 950; color: #facc15; margin-bottom: 4px; }
.flow-meta { font-size: 13px; color: rgba(255,255,255,.7); }
.flow-submission-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}
.flow-submission-status .submission-grid {
  max-height: 118px;
  overflow-y: auto;
  padding-right: 2px;
}
.preflight-import-panel {
  margin-top: 16px;
  padding: 14px 16px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 10px;
}
.preflight-import-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr);
  gap: 12px;
}
.preflight-import-card {
  min-width: 0;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  border: 1px solid #bbf7d0;
}
.preflight-import-card--music { background: #f8fafc; border-color: #cbd5e1; }
.preflight-import-title {
  font-size: 14px;
  font-weight: 950;
  color: #166534;
  margin-bottom: 6px;
}
.preflight-import-card--music .preflight-import-title { color: #0f766e; }
.preflight-import-desc {
  min-height: 34px;
  margin-bottom: 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}
.preflight-import-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.preflight-import-actions button {
  padding: 8px 14px;
  background: #059669;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}
.preflight-import-actions button:nth-of-type(2) { background: #2563eb; }
.preflight-import-actions input[type="file"] { max-width: 270px; font-size: 12px; }
.preflight-import-actions span { color: #64748b; font-size: 12px; font-weight: 800; }
.preflight-import-card textarea {
  width: 100%;
  min-height: 74px;
  margin-bottom: 8px;
  padding: 8px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  font-size: 12px;
  resize: vertical;
}
.preflight-import-preview {
  max-height: 120px;
  overflow-y: auto;
  color: #374151;
  font-size: 12px;
}
@media (max-width: 900px) {
  .flow-submission-status { grid-template-columns: 1fr; }
  .preflight-import-grid { grid-template-columns: 1fr; }
  /* 手机/窄屏：三屏预览改单列，避免挤爆 */
  .dual-screen { grid-template-columns: 1fr; }
}

.flow-buttons {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px;
}
.flow-btn {
  flex: 1 1 140px; padding: 12px 10px; border-radius: 12px;
  font-size: 15px; font-weight: 800; border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.2,.7,.2,1), box-shadow .18s ease, filter .18s ease, background .2s ease;
  background: linear-gradient(180deg, #eef2f7, #e2e8f0); color: #334155; border-color: #cbd5e1;
  box-shadow: 0 2px 5px rgba(15,23,42,.10), inset 0 1px 0 rgba(255,255,255,.65);
}
.flow-btn:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.flow-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15,23,42,.16), inset 0 1px 0 rgba(255,255,255,.6);
  filter: brightness(1.05);
}
.flow-btn:not(:disabled):active { transform: scale(.96) translateY(0); box-shadow: 0 2px 6px rgba(15,23,42,.14); }
.flow-btn.flow-btn-primary { background: linear-gradient(180deg, #2b5ad8, #1e40af); color: #fff; border-color: #1e3a8a; box-shadow: 0 3px 10px rgba(30,64,175,.35), inset 0 1px 0 rgba(255,255,255,.22); }
.flow-btn.flow-btn-green   { background: linear-gradient(180deg, #1ca45c, #15803d); color: #fff; border-color: #14532d; box-shadow: 0 3px 10px rgba(21,128,61,.35), inset 0 1px 0 rgba(255,255,255,.22); }
.flow-btn.flow-btn-danger  { background: linear-gradient(180deg, #ef4444, #dc2626); color: #fff; border-color: #991b1b; box-shadow: 0 3px 10px rgba(220,38,38,.35), inset 0 1px 0 rgba(255,255,255,.22); }
.flow-btn.flow-btn-warn    { background: linear-gradient(180deg, #f59e0b, #d97706); color: #fff; border-color: #b45309; box-shadow: 0 3px 10px rgba(217,119,6,.35), inset 0 1px 0 rgba(255,255,255,.22); }

.flow-log-title { font-size: 13px; font-weight: 800; color: #64748b; margin-bottom: 6px; }
.flow-log {
  background: #0f172a; border-radius: 8px; padding: 10px 14px;
  min-height: 80px; max-height: 160px; overflow-y: auto;
}
.flow-log p { margin: 2px 0; font-size: 12px; color: #94a3b8; font-family: monospace; }

/* 候场状态列表（导演端标记，管理端实时显示确认信号） */
.flow-standby-section { margin-top: 12px; }
.flow-standby-row {
  display: flex; align-items: center; gap: 8px;
  margin: 3px 0; padding: 4px 10px;
  font-size: 12px; font-family: Consolas, monospace;
  border-radius: 6px; border: 1px solid transparent;
  background: #1e293b; color: #94a3b8;
}
.flow-standby-row.current { background: #172554; color: #93c5fd; border-color: #2563eb; font-weight: 800; }
.flow-standby-row.current::before {
  content: "●"; color: #3b82f6; font-size: 11px;
}
.flow-standby-row.ready   { background: #052e16; color: #86efac; border-color: #16a34a; font-weight: 800; }
.flow-standby-row.ready::before {
  content: "●"; color: #22c55e; font-size: 11px; text-shadow: 0 0 6px #22c55e;
}
.flow-standby-row.waiting { background: #1e293b; color: #94a3b8; }
.flow-standby-row.missing { background: #450a0a; color: #fca5a5; border-color: #dc2626; }
.flow-standby-row.missing::before {
  content: "●"; color: #ef4444; font-size: 11px;
}
.flow-standby-row.ended   { background: #450a0a; color: #fca5a5; border-color: #b91c1c; text-decoration: line-through; }
.flow-standby-row.ended::before {
  content: "●"; color: #ef4444; font-size: 11px;
}

/* ── 管理端：分组排名滚动播报区（一次显示5行，完成一个组别向上滚动一次） ── */
.rank-scroll-area {
  overflow: hidden; border-radius: 10px;
  background: #0f172a; margin: 10px 0;
  border: 1px solid #1e3a5f;
}
.rank-scroll-empty { color: #64748b; text-align: center; padding: 60px 0; font-size: 13px; }
.rank-scroll-inner { will-change: transform; }
.rank-scroll-gtitle {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 14px;
  background: #1e3a5f; color: #bfdbfe;
  font-weight: 800; font-size: 13px;
}
.rank-scroll-gtitle .rs-gmeta { font-weight: 400; color: #93c5fd; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-scroll-row {
  display: grid; grid-template-columns: 30px 92px 1fr auto 90px;
  align-items: center; gap: 10px;
  height: 40px; padding: 0 14px;
  border-top: 1px solid rgba(255,255,255,.06);
  color: #e2e8f0; font-size: 13px;
}
.rank-scroll-row.first { background: rgba(34,197,94,.12); }
.rank-scroll-row .rs-rank { color: #94a3b8; font-weight: 800; font-family: monospace; }
.rank-scroll-row .rs-name { font-weight: 800; }
.rank-scroll-row .rs-work { color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-scroll-row .rs-score { text-align: right; font-weight: 950; color: #fde047; font-family: monospace; }
/* 奖项徽章：冠军金 / 亚军银 / 季军铜 / 最具潜力奖紫 */
.rank-scroll-row .rs-award {
  font-size: 11px; font-weight: 900; text-align: center;
  padding: 2px 6px; border-radius: 999px; white-space: nowrap;
  color: #0f172a; letter-spacing: 1px;
}
.rank-scroll-row .rs-award.award-1 { background: linear-gradient(90deg, #fde047, #f59e0b); color: #451a03; }
.rank-scroll-row .rs-award.award-2 { background: linear-gradient(90deg, #e2e8f0, #94a3b8); color: #1e293b; }
.rank-scroll-row .rs-award.award-3 { background: linear-gradient(90deg, #fdba74, #c2410c); color: #431407; }
.rank-scroll-row .rs-award.award-4 { background: linear-gradient(90deg, #c4b5fd, #7c3aed); color: #2e1065; }

/* ── 音控端：本地音乐库（每首单独循环） ── */
.lib-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 10px; border-bottom: 1px solid #1e293b;
  font-size: 12px; color: #cbd5e1;
}
.lib-row.playing { background: rgba(34, 197, 94, .12); color: #86efac; }
.lib-row .lib-name {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.lib-row .lib-play {
  flex-shrink: 0; padding: 4px 12px; border-radius: 6px;
  border: 1px solid #16a34a; background: #14532d; color: #bbf7d0;
  font-size: 12px; font-weight: 800; cursor: pointer;
}
.lib-row.playing .lib-play { background: #7f1d1d; border-color: #dc2626; color: #fecaca; }

/* ── 音控端：选手进度行音频位标记（乐/播/幕） ── */
.audio-marks { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #94a3b8; }
.audio-marks i { font-style: normal; }
.audio-marks .am-ok { color: #22c55e; }
.audio-marks .am-no { color: #475569; }
.audio-marks em { font-style: normal; margin-right: 4px; }
.audio-bind-btns { display: inline-flex; gap: 4px; margin-left: 6px; vertical-align: middle; }
.audio-bind-btns .ab-btn {
  padding: 1px 8px; border-radius: 6px; font-size: 11px; font-weight: 800;
  border: 1px solid #475569; background: #1e293b; color: #cbd5e1; cursor: pointer;
}
.audio-bind-btns .ab-btn:hover { background: #2563eb; border-color: #3b82f6; color: #fff; }

/* ── 评审 / 监评端：登录身份区 + 信号灯 + 选手进度列表 ── */
.role-profile {
  display: flex; align-items: center; gap: 12px;
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 12px 14px; margin: 10px 0 12px;
}
.role-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover; border: 2px solid #cbd5e1;
  background: #e2e8f0;
}
.role-meta { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.role-name { font-size: 17px; color: #0f172a; }
.role-tag {
  align-self: flex-start; font-size: 11px; font-weight: 800;
  background: #2563eb; color: #fff; padding: 2px 10px; border-radius: 999px;
}
.role-tag-red { background: #dc2626; }

/* 信号灯：红=未输入，绿=已输入/已提交（与主控后台同一数据源） */
.signal-dot {
  display: inline-block; width: 16px; height: 16px; border-radius: 50%;
  flex-shrink: 0; transition: background .2s, box-shadow .2s;
}
.signal-dot.red { background: #ef4444; box-shadow: 0 0 0 4px #fee2e2; animation: signal-blink 1.2s ease-in-out infinite; }
.signal-dot.ended { background: #dc2626; box-shadow: 0 0 0 4px #fee2e2; }
.signal-dot.blue { background: #2563eb; box-shadow: 0 0 0 4px #dbeafe; animation: signal-blink 1.2s ease-in-out infinite; }
.signal-dot.green { background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.signal-dot.gray { background: #64748b; box-shadow: 0 0 0 4px #e2e8f0; }
.signal-dot.yellow { background: #eab308; box-shadow: 0 0 0 4px #fef9c3; }
@keyframes signal-blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.role-progress-title {
  font-size: 13px; font-weight: 800; color: #64748b;
  margin: 8px 0 6px; display: flex; justify-content: space-between; align-items: center;
}
.role-progress-hint { font-size: 11px; font-weight: 400; color: #94a3b8; }
/* 进度列表自动滚动视口：固定窗口，随比赛推进轨道上移；禁止手动滚动（含触摸），由主控流程控制 */
.role-progress-viewport {
  background: #0f172a; border-radius: 10px; padding: 6px 10px;
  height: 132px; overflow: hidden; margin-bottom: 10px;
  position: relative;
  touch-action: none; user-select: none;
}
.role-progress-track {
  transition: transform .9s cubic-bezier(.4, 0, .2, 1);
}
.role-progress-row {
  display: grid; grid-template-columns: 30px 1fr 58px 52px 1fr auto 64px;
  align-items: center; gap: 8px;
  padding: 5px 8px; border-radius: 6px;
  font-size: 12px; color: #cbd5e1;
  min-height: 38px;
}
.role-progress-row .rp-name { display: inline-flex; align-items: center; gap: 5px; min-width: 0; color: #f1f5f9; font-weight: 800; white-space: nowrap; }
/* 信号灯并入姓名列：小圆点紧贴姓名 */
.role-progress-row .signal-dot { width: 12px; height: 12px; flex-shrink: 0; }
.role-progress-row .signal-dot.red { box-shadow: 0 0 0 3px #fee2e2; }
.role-progress-row .signal-dot.ended { box-shadow: 0 0 0 3px #fee2e2; }
.role-progress-row .signal-dot.blue { box-shadow: 0 0 0 3px #dbeafe; }
.role-progress-row .signal-dot.green { box-shadow: 0 0 0 3px #dcfce7; }
.role-progress-row .signal-dot.gray { box-shadow: 0 0 0 3px #e2e8f0; }
.role-progress-row .signal-dot.yellow { box-shadow: 0 0 0 3px #fef9c3; }
.role-progress-row .rp-seq { color: #64748b; font-weight: 800; font-family: monospace; }
.role-progress-row .rp-group { color: #94a3b8; font-size: 11px; }
.role-progress-row .rp-division { color: #fbbf24; font-size: 11px; font-weight: 800; }
.role-progress-row .rp-work { color: #94a3b8; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-progress-row .rp-state { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; background: #334155; color: #94a3b8; white-space: nowrap; }
.role-progress-row .rp-state.ok { background: #14532d; color: #86efac; }
/* 已比过行的有效成绩分值 */
.role-progress-row .rp-final { font-size: 12px; font-weight: 950; font-family: monospace; color: #fde047; text-align: right; white-space: nowrap; }
.role-progress-row:not(.ended) .rp-final { visibility: hidden; }
.role-progress-row.current { background: linear-gradient(90deg, rgba(59,130,246,.25), rgba(59,130,246,.08)); }
.role-progress-row.current .rp-seq { color: #3b82f6; }
.role-progress-row.current .rp-name { color: #93c5fd; }
.role-progress-row.current .rp-state { background: #2563eb; color: #fff; }
.role-progress-row.ended { opacity: .55; }
.role-progress-row.ended .rp-name { text-decoration: line-through; color: #fca5a5; }

.flow-music-section { margin: 12px 0; padding: 12px 14px; background: #f8fafc; border-radius: 8px; border: 1px solid #e2e8f0; }
.flow-music-section label { font-size: 13px; font-weight: 700; color: #334155; display: flex; flex-direction: column; gap: 6px; }

#flowStateBadge.badge-performing { color: #fff; background: #0891b2; }
#flowStateBadge.badge-scoring    { color: #fff; background: #d97706; }
#flowStateBadge.badge-pause      { color: #fff; background: #dc2626; }
#flowStateBadge.badge-intermission { color: #fff; background: #7c3aed; }

.contestant-card {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  align-items: center;
  padding: 14px;
  margin: 10px 0 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}
.contestant-card img {
  width: 86px;
  height: 116px;
  object-fit: cover;
  border-radius: 6px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}
.contestant-card-title {
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 4px;
}
.contestant-card-name {
  font-size: 18px;
  font-weight: 950;
  color: #0f172a;
  margin-bottom: 8px;
}
.contestant-card-name span { color: #64748b; font-size: 13px; }
.contestant-card-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 4px 10px;
  font-size: 12px;
}
.contestant-card-grid span { color: #64748b; }
.contestant-card-grid strong { color: #1e293b; }
.score-locked-summary {
  padding: 12px 14px;
  border-radius: 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 14px;
  line-height: 1.65;
}
.score-keypad {
  display: grid;
  grid-template-columns: repeat(3, minmax(64px, 1fr));
  gap: 8px;
  margin-top: 10px;
}
/* 计数器式打分输入（评审端）：大号输入框 + 实时范围提示 */
.score-counter-box {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}
.score-counter-box .score-input {
  width: 100%;
  min-height: 64px;
  font-size: 34px;
  font-weight: 900;
  text-align: center;
  letter-spacing: 2px;
  border: 2px solid #1d4ed8;
  border-radius: 12px;
  background: #eff6ff;
  color: #1e3a8a;
  font-family: "Consolas", "Courier New", monospace;
  outline: none;
  box-sizing: border-box;
}
.score-counter-box .score-input:focus { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.score-range-hint { font-size: 12px; font-weight: 700; color: #64748b; min-height: 16px; }
.score-range-hint.ok   { color: #16a34a; }
.score-range-hint.warn { color: #dc2626; }
/* 打分对象行（评审/监评打分区顶部） */
.score-target {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px;
  font-size: 13px; color: #475569; padding: 8px 10px;
  background: #f1f5f9; border-radius: 8px; border: 1px solid #e2e8f0;
}
.score-target strong { color: #0f172a; font-size: 15px; }
.score-target span { color: #64748b; font-size: 12px; }
/* 数字键盘清空键 */
.score-keypad .keypad-clear { background: #fee2e2; color: #b91c1c; }
/* 进度列表：只读展示，禁止点击/手选（打分对象由主控流程控制） */
.role-progress-row { pointer-events: none; }
.score-keypad button,
.director-row-actions button {
  min-height: 40px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-weight: 900;
  cursor: pointer;
}
/* 导演端已候场按钮：绿色确认态 */
.director-row-actions button.done {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff;
}
.score-keypad button:active,
.director-row-actions button:active { transform: scale(.98); }
.director-current-card { display: grid; gap: 10px; }
.director-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}
.director-state {
  color: #334155;
  font-weight: 900;
  font-size: 13px;
}
.director-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  /* 列表内滚动：39 位选手不用整页拖，框内上下滚（笔记本/平板友好） */
  max-height: calc(100vh - 330px);
  overflow-y: auto;
  padding-right: 4px;
}
.director-row {
  display: grid;
  grid-template-columns: 14px 1fr auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
/* 比过选手的有效成绩标签 */
.director-row-score {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.director-row-score b { font-size: 14px; font-weight: 950; margin-left: 4px; }
.director-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #94a3b8;
}
.director-dot.ready { background: #22c55e; box-shadow: 0 0 0 4px #dcfce7; }
.director-dot.waiting { background: #f59e0b; box-shadow: 0 0 0 4px #fef3c7; }
.director-dot.missing { background: #ef4444; box-shadow: 0 0 0 4px #fee2e2; }
.director-info { display: grid; gap: 3px; }
.director-info strong { color: #0f172a; font-size: 14px; }
.director-info span { color: #64748b; font-size: 12px; }
.director-row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ── T28 音控端 / 观众端 全局样式 ─────── */
.audience-header {
  background: linear-gradient(135deg,#172554,#7c3aed);
  padding: 24px 20px; color: #fff;
}
.audience-header h1 { margin:0; font-size: clamp(22px,5vw,36px); font-weight:950; }
.audience-header p  { margin:6px 0 0; color:rgba(255,255,255,.7); font-size:14px; }

.audience-card {
  background: #fff; border-radius: 14px; padding: 18px;
  border: 1px solid #e2e8f0; box-shadow: 0 4px 16px rgba(0,0,0,.06);
  margin-bottom: 14px;
}
.audience-card h2 { margin: 0 0 12px; font-size: 16px; color: #1e293b; font-weight: 900; }
.audience-status-chip {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 800;
}
.status-performing   { background: #cffafe; color: #0e7490; }
.status-scoring      { background: #fef9c3; color: #854d0e; }
.status-published    { background: #dcfce7; color: #166534; }
.status-waiting      { background: #f1f5f9; color: #64748b; }
.status-pause        { background: #fee2e2; color: #991b1b; }
.status-intermission { background: #ede9fe; color: #6d28d9; }

.ranking-card { display:flex; align-items:center; gap:12px; padding:10px 0; border-bottom:1px solid #f1f5f9; }
.ranking-card:last-child { border-bottom: none; }
.rank-num { font-size:20px; font-weight:950; color:#facc15; width:36px; text-align:center; flex-shrink:0; }
.rank-info { flex:1; }
.rank-info .name { font-size:15px; font-weight:800; color:#1e293b; }
.rank-info .meta { font-size:12px; color:#94a3b8; margin-top:2px; }
.rank-score { font-size:22px; font-weight:950; color:#166534; }

/* ── 音控端样式 ─────────────────────────── */
.audio-panel {
  max-width: 1400px; margin: 0 auto; padding: 24px 20px;
}
.audio-status-bar {
  background: #0f172a; color: #94a3b8;
  padding: 10px 14px; border-radius: 8px; font-size:13px;
  font-family: monospace; margin-bottom: 14px; min-height: 48px;
}
.audio-status-bar .status-line { color: #4ade80; font-weight:700; }
.audio-now-playing {
  background: linear-gradient(135deg,#0d3b35,#1a5c52);
  border-radius: 12px; padding: 16px 18px; color:#fff; margin-bottom:14px;
}
.audio-now-playing .track-title { font-size:18px; font-weight:950; color:#facc15; }
.audio-now-playing .track-meta  { font-size:13px; color:rgba(255,255,255,.6); margin-top:4px; }
.audio-standby { color:#64748b; font-size:14px; text-align:center; padding:20px; }

/* ── Admin submit progress board ───────────────── */
.submission-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 6px; padding: 8px 10px;
  border-radius: 8px; border: 1px solid #e2e8f0; background: #fff;
}
.submission-head div { display: grid; gap: 2px; }
.submission-head span { color: #64748b; font-size: 11px; font-weight: 800; }
.submission-head strong { color: #0f172a; font-size: 22px; font-weight: 950; line-height: 1; }
.submission-head em {
  min-width: 44px; text-align: center; padding: 4px 8px; border-radius: 999px;
  font-style: normal; font-size: 12px; font-weight: 900;
}
.submission-head.ready { border-color: #86efac; background: #f0fdf4; }
.submission-head.ready em { color: #166534; background: #dcfce7; }
.submission-head.pending { border-color: #e2e8f0; background: #f8fafc; }
.submission-head.pending em { color: #64748b; background: #e2e8f0; }
.submission-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
/* 评审灯阵（袁总 2026-08-09 美化）：头像 + 照片姓名 + 帮助同一行横向紧凑，一眼看全 */
.submit-lamp {
  position: relative;
  display: flex; flex-direction: row; align-items: center; gap: 6px;
  padding: 5px 7px; border-radius: 12px; border: 1px solid #e2e8f0; background: #fff;
  text-align: center; transition: border-color .2s, background .2s;
}
.submit-lamp.done { border-color: #bbf7d0; background: #f0fdf4; }
.submit-lamp.waiting { border-color: #e2e8f0; background: #f8fafc; }
.submit-avatar {
  width: 34px; height: 34px; border-radius: 999px; overflow: hidden;
  display: grid; place-items: center; background: #e2e8f0; color: #64748b; font-weight: 900; font-size: 14px;
  box-shadow: 0 0 0 2px #ef4444; flex-shrink: 0;
}
.submit-lamp.done .submit-avatar { box-shadow: 0 0 0 2px #22c55e; }
.submit-lamp.waiting .submit-avatar { box-shadow: 0 0 0 2px #ef4444; }
.submit-avatar img { width: 100%; height: 100%; object-fit: cover; }
.submit-info { min-width: 0; flex: 1; width: auto; }
.submit-info-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.submit-info-row strong { display: block; color: #1e293b; font-size: 12px; font-weight: 900; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.submit-info-row span { display: block; color: #64748b; font-size: 10px; font-weight: 800; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
/* 已提交分值：绿色徽章胶囊（醒目） */
.submit-lamp.done .submit-info-row span {
  display: inline-block; max-width: 100%;
  background: linear-gradient(135deg, #16a34a, #15803d); color: #fff;
  padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 900;
  box-shadow: 0 1px 3px rgba(21,128,61,.35);
}
.submit-lamp.waiting .submit-info-row span { display: inline-block; background: #e2e8f0; color: #64748b; padding: 2px 8px; border-radius: 999px; }
/* 总控代填区：平时收拢为"帮助"小按钮（与照片姓名同一行），点击展开输入框+确认（评审/监评手机故障时应急，效果等同本人提交） */
.admin-fill-row { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.admin-fill-toggle {
  flex-shrink: 0; padding: 2px 8px; border-radius: 6px;
  border: 1px solid #d97706; background: #fffbeb; color: #b45309;
  font-size: 10px; font-weight: 800; cursor: pointer;
}
.admin-fill-toggle:hover { background: #fef3c7; }
.admin-fill { display: none; gap: 4px; min-width: 0; position: absolute; left: 6px; right: 6px; bottom: calc(100% + 4px); z-index: 20; background: #fff; border: 1px solid #d97706; border-radius: 8px; padding: 4px; box-shadow: 0 6px 16px rgba(15,23,42,.15); }
/* 灯阵第二行（评审 7-11 号 / 6列第二行起）：帮助弹出向下弹，避免盖住第一行 */
.submission-grid .submit-lamp:nth-child(n+7) .admin-fill { bottom: auto; top: calc(100% + 4px); }
.admin-fill.open { display: flex; }
.admin-fill-input {
  flex: 1; min-width: 0; width: 100%; box-sizing: border-box;
  padding: 2px 6px; border-radius: 6px; border: 1px solid #cbd5e1;
  font-size: 12px; font-weight: 800; color: #1e293b; background: #fff;
}
.admin-fill-input:focus { outline: none; border-color: #3b82f6; }
.admin-fill-confirm {
  flex-shrink: 0; padding: 2px 10px; border-radius: 6px;
  border: 1px solid #2563eb; background: #2563eb; color: #fff;
  font-size: 11px; font-weight: 800; cursor: pointer;
}
.admin-fill-confirm:hover { background: #1d4ed8; }
.admin-fill-cancel {
  flex-shrink: 0; padding: 2px 10px; border-radius: 6px;
  border: 1px solid #cbd5e1; background: #f1f5f9; color: #475569;
  font-size: 11px; font-weight: 800; cursor: pointer;
}
.admin-fill-cancel:hover { background: #e2e8f0; }
.submission-empty { color: #64748b; font-weight: 800; }
@media (max-width: 760px) {
  .submission-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .submission-head strong { font-size: 20px; }
}
/* Director-only mode */
body.role-director {
  background: #f8fafc;
}
body.role-director .hero,
body.role-director .tabs,
body.role-director main.layout > section:not(#director) {
  display: none !important;
}
body.role-director .layout {
  width: min(760px, calc(100% - 20px));
  margin: 12px auto 28px;
}
body.role-director #director {
  display: block !important;
  min-height: calc(100vh - 24px);
}
body.role-director #director .section-head h2::after {
  content: " · 独立端口";
  color: #16a34a;
}
body.role-director .director-current-card .contestant-card {
  grid-template-columns: 118px 1fr;
  gap: 18px;
}
body.role-director .director-current-card .contestant-card img {
  width: 118px;
  height: 158px;
}
/* Judge / supervisor single-port mode */
body.role-single {
  background: #f8fafc;
}
body.role-single .tabs,
body.role-judge main.layout > section:not(#judge),
body.role-supervisor main.layout > section:not(#supervisor) {
  display: none !important;
}
/* 端口导航模式（根地址无 role）：渲染前就隐藏评分端 UI（hero/tabs/main），防止刷新闪现主控画面 */
body.role-portal header.hero,
body.role-portal nav.tabs,
body.role-portal main.layout {
  display: none !important;
}
/* 管理端（admin）：隐藏评审打分 / 监评扣分区域（打分由评审端/监评端独立操作；导演侧台已移出主文档，仅 director.html 独立存在） */
body.role-admin main.layout > section#judge,
body.role-admin main.layout > section#supervisor {
  display: none !important;
}
/* 管理端页面顺序：评审头像状态/发布/排名（admin 为主，双屏预览并入其中） */
body.role-admin main.layout > section#bigscreen { order: -3; }
body.role-admin main.layout > section#flow      { order: -2; }
body.role-admin main.layout > section#admin     { order: -1; }
/* 主控双屏布局（袁总 2026-08-09）：页面全宽，屏A名单获奖（左） + 屏B打分成绩（右）两列占满 */
body.role-admin main.layout { width: calc(100% - 16px); }
.dual-screen { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 14px; }
.screen-pane { border: 1px solid #dbe3ef; border-radius: 14px; overflow: hidden; background: #0f172a; }
.pane-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #0f172a; color: #e2e8f0; font-size: 13px; font-weight: 800; border-bottom: 1px solid #1e293b; }
.pane-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: #000; }
body.role-single .hero {
  padding: 18px 16px;
}
body.role-single .hero h1 {
  font-size: 22px;
}
body.role-single .hero p {
  display: none;
}
body.role-single .layout {
  max-width: 720px;
  width: min(720px, calc(100% - 20px));
  margin: 12px auto 32px;
}
/* 监评端满屏：扣分项 3-4 列平铺，笔记本宽屏不用下拉（评审端保持聚焦窄版） */
body.role-supervisor .layout {
  max-width: 1920px;
  width: 100%;
}
body.role-single .panel {
  padding: 16px;
  border-radius: 12px;
}
body.role-single .section-head {
  align-items: center;
}
body.role-single .eyebrow {
  font-size: 12px;
}
body.role-single label {
  font-size: 14px;
  font-weight: 800;
}
body.role-single input,
body.role-single select {
  min-height: 44px;
  font-size: 15px;
}
body.role-single button {
  min-height: 44px;
}
body.role-judge #judge {
  display: block !important;
}
body.role-supervisor #supervisor {
  display: block !important;
}
body.role-judge #judge .section-head h2::after {
  content: " · 独立端口";
  color: #2563eb;
}
body.role-supervisor #supervisor .section-head h2::after {
  content: " · 独立端口";
  color: #dc2626;
}
.director-list-title {
  padding: 8px 2px 2px;
  color: #334155;
  font-size: 13px;
  font-weight: 950;
}
.director-row--current {
  border-color: #2563eb;
  background: #eff6ff;
}
.director-row--ended {
  border-color: #fecaca;
  background: #fff1f2;
}
.director-row--ended .director-info strong,
.director-row--ended .director-info span,
.director-row--ended .director-row-status {
  color: #dc2626 !important;
}
.director-dot.current { background: #2563eb; box-shadow: 0 0 0 4px #dbeafe; }
.director-dot.ended { background: #dc2626; box-shadow: 0 0 0 4px #fee2e2; }
.director-row-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
body.role-director .layout {
  width: min(980px, calc(100% - 20px));
}
body.role-director .director-list {
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  padding-right: 4px;
}


.stream-player-card {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
  border: 1px solid rgba(255,255,255,.08);
}
.stream-player {
  width: 100%;
  height: 100%;
  display: block;
  background: #000;
  object-fit: contain;
}
.stream-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 20px;
  text-align: center;
  color: rgba(255,255,255,.28);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0;
}
/* ══ 评审名单管理编辑器（袁总 2026-08-09）：四列卡片 + 编号/照片上传 ══ */
.judges-editor { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.je-card { display: flex; flex-direction: column; gap: 6px; padding: 8px; background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; }
.je-card .je-code { width: 100%; box-sizing: border-box; padding: 4px 6px; border-radius: 6px; border: 1px solid #cbd5e1; font-size: 12px; font-weight: 800; text-align: center; color: #1e293b; }
.je-card .je-name { width: 100%; box-sizing: border-box; padding: 5px 8px; border-radius: 6px; border: 1px solid #cbd5e1; font-size: 12px; font-weight: 800; color: #1e293b; }
.je-card .je-domain { width: 100%; box-sizing: border-box; padding: 4px 6px; border-radius: 6px; border: 1px solid #cbd5e1; font-size: 11px; }
.je-avatar-row { display: flex; align-items: center; gap: 6px; }
.je-avatar-row .je-preview { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; background: #e2e8f0; flex-shrink: 0; border: 1px solid #e2e8f0; }
.je-up { flex: 1; padding: 4px 6px; border-radius: 6px; border: 1px solid #93c5fd; background: #eff6ff; color: #1d4ed8; font-size: 11px; font-weight: 800; cursor: pointer; }
.je-del { padding: 4px 6px; border-radius: 6px; border: 1px solid #fca5a5; background: #fef2f2; color: #b91c1c; font-size: 11px; font-weight: 800; cursor: pointer; }
@media (max-width: 1200px) { .judges-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ══════════════════════════════════════════════
   ══ 主控操作台主题升级（袁总 2026-08-09）
   ══ role-admin 专属浅色高级风：背景层次 / 面板立体 / 状态条发光 / 灯阵 hover / 公示按钮渐变
   ══ 纯视觉覆盖，功能与结构零改动；仅作用于主控后台，其他端不受影响
   ══════════════════════════════════════════════ */
body.role-admin { background: linear-gradient(160deg, #eef2f7 0%, #e7edf5 45%, #eef4f9 100%); }
body.role-admin .hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #123a35 100%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
body.role-admin .hero h1 {
  background: linear-gradient(90deg, #facc15, #fde68a);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.role-admin .hero p, body.role-admin .hero small { color: rgba(255,255,255,.72); }
body.role-admin .layout { gap: 14px; }
body.role-admin main.layout > section#admin {
  border: 1px solid rgba(15,23,42,.08); border-radius: 20px; background: #fff;
  box-shadow: 0 18px 50px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.05);
}
body.role-admin .section-head { border-bottom: 1px solid #eef2f7; padding-bottom: 12px; margin-bottom: 12px; }
body.role-admin .section-head h2 { font-size: 22px; letter-spacing: .02em; }
body.role-admin .eyebrow { letter-spacing: .18em; }
/* 当前选手状态条：深绿渐变 + 发光 */
body.role-admin #flowContestantInfo {
  background: linear-gradient(135deg, #0b3b34, #1f6b5e);
  box-shadow: 0 6px 18px rgba(13,60,50,.25), inset 0 0 0 1px rgba(255,255,255,.12);
  border-radius: 14px;
}
body.role-admin #flowContestantName { font-size: clamp(22px, 2.6vw, 30px); }
/* 按钮行：更精致的圆角、渐变阴影与悬浮动效 */
body.role-admin .flow-buttons { gap: 8px; }
body.role-admin .flow-btn { border-radius: 12px; font-size: 14px; }
body.role-admin .flow-btn:not(:disabled):hover { transform: translateY(-2px); filter: brightness(1.07); }
body.role-admin .flow-btn:not(:disabled):active { transform: scale(.96); }
/* 评审/监评状态卡片区 */
body.role-admin .control-grid article {
  border: 1px solid #e2e8f0; border-radius: 16px; background: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
body.role-admin .control-grid h3 {
  font-size: 13px; letter-spacing: .08em; color: #475569; text-transform: uppercase;
  padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid #e2e8f0;
}
/* 灯阵卡片：hover 上浮 */
body.role-admin .submit-lamp { transition: transform .15s, box-shadow .2s, border-color .2s; }
body.role-admin .submit-lamp:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15,23,42,.10); }
/* 公示打分按钮：绿色强调（尺寸贴合文字，底色绿） */
body.role-admin .control-grid .sup-col #btnShowResult {
  background: linear-gradient(135deg, #16a34a, #15803d); border: none; color: #fff;
  border-radius: 8px; box-shadow: 0 3px 10px rgba(22,163,74,.30);
}
body.role-admin .control-grid .sup-col #btnShowResult:not(:disabled):hover { filter: brightness(1.08); transform: translateY(-1px); }
/* 双屏预览框升级 */
body.role-admin .screen-pane { border-radius: 16px; box-shadow: 0 8px 24px rgba(15,23,42,.14); }
body.role-admin .pane-head { background: linear-gradient(90deg, #0f172a, #1e3a5f); color: #f1f5f9; font-size: 14px; }
body.role-admin .pane-head a { color: #93c5fd !important; }
/* 评审名单管理区 */
body.role-admin .judges-admin { border-color: #e2e8f0; background: #f8fafc; box-shadow: 0 2px 8px rgba(15,23,42,.05); }
body.role-admin .je-card { box-shadow: 0 1px 4px rgba(15,23,42,.06); border-radius: 12px; transition: box-shadow .2s, transform .15s; }
body.role-admin .je-card:hover { box-shadow: 0 6px 16px rgba(15,23,42,.12); transform: translateY(-1px); }

/* ══════════════════════════════════════════════
   ══ 主控满屏一屏布局（袁总 2026-08-09）：F11 全屏后所有操作一屏放完，不用滚动
   ══ 顶部一行（hero 压缩）→ 中间双屏预览占满 → 底部控制行（流程/灯阵/监评/公示）
   ══ 名单设置默认收起（换名单走"喂给破空"通道，不占主控空间）
   ══════════════════════════════════════════════ */
html, body { height: 100%; }
body.role-admin { height: 100vh; overflow: hidden; }
/* 顶部 hero 压缩为单行工具条 */
body.role-admin .hero {
  padding: 8px 18px;
  display: flex; align-items: center; gap: 14px;
}
body.role-admin .hero h1 { font-size: 18px; margin: 0; white-space: nowrap; }
body.role-admin .hero p { display: none; }
body.role-admin .tabs { display: none; }   /* 主控全屏专注操作，隐藏跳转导航 */
/* 布局容器：全屏纵向，可下拉滚动（内容超出时页面滚动，不再裁切） */
body.role-admin main.layout {
  width: 100%; min-height: calc(100vh - 52px);
  margin: 0; padding: 8px 10px 10px;
  box-sizing: border-box;
  display: flex; flex-direction: column;
  gap: 10px; overflow: visible;
}
body.role-admin main.layout > section#admin {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column;
  padding: 10px 14px 12px; margin: 0;
}
/* section-head 压缩 */
body.role-admin main.layout > section#admin .section-head {
  padding-bottom: 6px; margin-bottom: 8px; flex-shrink: 0;
}
body.role-admin main.layout > section#admin .section-head h2 { font-size: 16px; }
/* 当前选手状态条压缩 */
body.role-admin #flowContestantInfo {
  flex-shrink: 0; padding: 6px 14px;
}
body.role-admin #flowContestantName { font-size: clamp(18px, 1.8vw, 24px); }
body.role-admin #flowContestantMeta { font-size: 12px; }
/* 流程按钮行压缩 */
body.role-admin .flow-buttons {
  flex-shrink: 0; padding-top: 8px; margin-bottom: 6px;
  gap: 6px;
}
body.role-admin .flow-buttons .flow-btn { padding: 6px 12px; font-size: 12px; }
/* 双屏预览：flex 占满剩余高度（iframe 高度自适应，不再固定 540px） */
/* 三屏预览：固定高度（内容超出时页面下拉滚动，不再依赖弹性撑高被裁切） */
/* 三屏预览：3 块平均分布（1:1:1），每块 16:9 比例 */
body.role-admin .dual-screen {
  flex-shrink: 0;
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 10px; margin-top: 0;
}
body.role-admin .screen-pane {
  display: flex; flex-direction: column; min-height: 0;
}
body.role-admin .pane-frame {
  width: 100%; aspect-ratio: 16 / 9; min-height: 0; flex: none;
  display: block; border: 0; background: #000;
}
/* 底部控制行（评审灯阵 + 监评 + 公示）：固定高度，不占主区 */
body.role-admin .control-grid {
  flex-shrink: 0; margin-top: 10px;
}
/* 名单设置：默认收起，仅一行标题 */
body.role-admin .judges-admin {
  flex-shrink: 0; margin-top: 8px; padding: 6px 12px;
}
body.role-admin .judges-admin[open] { padding: 10px 14px; }
body.role-admin .judges-admin summary { font-size: 12px; padding: 2px 0; }
body.role-admin .judges-editor { max-height: 180px; overflow-y: auto; }

/* ═══ 评审端手机适配（2026-08-28）：现场评审用手机打分，压缩进度列表让打分键盘+提交一屏内 ═══ */
@media (max-width: 640px) {
  body.role-judge .role-progress-viewport {
    height: 110px; margin-bottom: 6px; padding: 5px 6px;
  }
  body.role-judge .role-progress-row {
    min-height: 30px; padding: 3px 5px; font-size: 11px; gap: 5px;
  }
  body.role-judge .role-progress-row .rp-work { max-width: 90px; }
  body.role-judge .role-profile { padding: 6px 0; }
  body.role-judge .score-counter-box .score-input {
    min-height: 52px; font-size: 30px;
  }
  body.role-judge .score-keypad { gap: 6px; margin-top: 6px; }
  body.role-judge .score-keypad button,
  body.role-judge .score-keypad .keypad-clear { min-height: 46px; font-size: 17px; }
  body.role-judge #submitScore { min-height: 50px; font-size: 17px; }
  body.role-judge .score-total { margin: 4px 0; }
  body.role-judge .score-target { margin-bottom: 4px; }
}
/* 评审端平板（640-900px）：进度列表适当压缩 */
@media (min-width: 641px) and (max-width: 900px) {
  body.role-judge .role-progress-viewport { height: 160px; }
}
body.role-admin .judges-editor { max-height: 180px; overflow-y: auto; }

/* ═══ 评审/监评端 横屏模式（2026-09-01）：左侧选手信息 / 右侧打分按键 ═══
   触发：① 面板顶部"横屏"按钮手动切换（body.role-landscape，记住选择）；
         ② 宽屏横屏（笔记本 / iPad 横屏 ≥1024px）自动两栏。
   竖屏（手机 / iPad 竖屏）：左右块纵向堆叠，保持现有单手操作。 */
.landscape-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 0 12px; padding: 8px 12px;
  background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
}
.landscape-hint { font-size: 12px; color: #1d4ed8; font-weight: 700; }
.landscape-toggle {
  flex-shrink: 0; padding: 8px 18px; border-radius: 8px;
  border: 2px solid #2563eb; background: #fff; color: #2563eb;
  font-size: 13px; font-weight: 900; cursor: pointer; transition: all .15s;
}
.landscape-toggle.active { background: #2563eb; color: #fff; }
.landscape-toggle:hover { background: #dbeafe; }
.landscape-toggle.active:hover { background: #1d4ed8; }
/* 当前选手信息卡（左栏顶部）：照片 + 姓名 + 分组 + 分值范围 */
.current-info-card { margin: 0 0 12px; min-width: 0; }
#judgePanel .split-left, #judgePanel .split-right,
#supervisorPanel .split-left, #supervisorPanel .split-right { min-width: 0; }

/* ── 横屏两栏（按钮手动切换） ── */
body.role-landscape #judgePanel,
body.role-landscape #supervisorPanel {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) minmax(340px, 6fr);
  gap: 18px;
  align-items: start;
}
body.role-landscape #judgePanel .split-left,
body.role-landscape #supervisorPanel .split-left { grid-column: 1; }
body.role-landscape #judgePanel .split-right,
body.role-landscape #supervisorPanel .split-right { grid-column: 2; }
/* 横屏时评审端放宽布局（默认 720px 窄版放不下两栏） */
body.role-landscape .layout {
  max-width: 1500px;
  width: calc(100% - 32px);
}

/* ── 宽屏横屏自动两栏（笔记本 / iPad 横屏，无需点按钮） ── */
@media (min-width: 1024px) and (orientation: landscape) {
  body.role-judge #judgePanel,
  body.role-supervisor #supervisorPanel {
    display: grid;
    grid-template-columns: minmax(300px, 5fr) minmax(360px, 6fr);
    gap: 18px;
    align-items: start;
  }
  body.role-judge #judgePanel .split-left,
  body.role-supervisor #supervisorPanel .split-left { grid-column: 1; }
  body.role-judge #judgePanel .split-right,
  body.role-supervisor #supervisorPanel .split-right { grid-column: 2; }
  body.role-judge .layout {
    max-width: 1500px;
    width: calc(100% - 32px);
  }
}
/* 手机横屏（宽度 <1024px，如 640×360）：若用户手动点了横屏，两栏仍成立，压缩列宽 */
@media (max-width: 1023px) and (orientation: landscape) {
  body.role-landscape #judgePanel,
  body.role-landscape #supervisorPanel {
    grid-template-columns: minmax(220px, 5fr) minmax(260px, 6fr);
    gap: 12px;
  }
  body.role-landscape .landscape-hint { display: none; }
}
