.bc-overlay {
  --bc-accent: #236fff;
  --bc-accent-hover: #185bd6;
  --bc-accent-soft: #edf3ff;
  --bc-accent-disabled: #819bc6;
  box-sizing: border-box;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 28, 45, 0.36);
}

/* 西电登录及其注册弹窗沿用页面青绿色，其他门户保留原主色。 */
.bgbody .bc-overlay {
  --bc-accent: #169a9a;
  --bc-accent-hover: #117878;
  --bc-accent-soft: #edf8f7;
  --bc-accent-disabled: #76aaa8;
}

.bc-dialog {
  box-sizing: border-box;
  width: 380px;
  max-width: 100%;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 28px;
  border-radius: 20px;
  background: #fff;
  color: #2e3033;
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  box-shadow: 0 16px 48px rgba(18, 28, 45, 0.2);
}

.bc-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
}

.bc-hint {
  margin: 0 0 14px;
  color: #606773;
  line-height: 22px;
}

.bc-prompt-image {
  display: block;
  width: 180px;
  height: 52px;
  max-width: 100%;
  margin: 0 auto 12px;
  border-radius: 6px;
}

.bc-reference {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 12px;
  border: 1px solid #e8ecef;
  border-radius: 6px;
  box-sizing: border-box;
}

.bc-disks {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-around;
  overflow: hidden;
}

.bc-disk {
  display: block;
  width: 43.3333%;
  height: auto;
  border-radius: 50%;
}

.bc-slider-label {
  display: block;
  margin-top: 8px;
  color: #666;
  font-size: 12px;
}

.bc-slider-label .bc-slider {
  margin-top: 0;
}

.bc-tile-grid {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  border-radius: inherit;
  overflow: hidden;
  background: #e8ecef;
}

.bc-tile {
  display: block;
  position: relative;
  min-width: 0;
  padding: 0;
  border: 0;
  background: #fff;
  cursor: pointer;
}

.bc-tile-image {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bc-tile-selected {
  outline: 3px solid var(--bc-accent);
  outline-offset: -3px;
  z-index: 1;
}

.bc-trace {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: crosshair;
}

.bc-trace:focus {
  outline: 2px solid var(--bc-accent);
  outline-offset: 3px;
}

.bc-board {
  position: relative;
  width: 100%;
  padding: 0;
  border-radius: 8px;
  color: var(--bc-accent);
  cursor: crosshair;
  user-select: none;
}

.bc-background {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
}

.bc-piece {
  position: absolute;
  left: 0;
  width: 14%;
  height: auto;
  pointer-events: none;
}

.bc-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 24px;
  height: 24px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--bc-accent);
  color: #fff;
  text-align: center;
  line-height: 24px;
  pointer-events: none;
}

.bc-cursor {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border: 2px solid #ff5152;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.bc-board:focus .bc-cursor {
  display: block;
}

.bc-slider {
  display: block;
  width: 100%;
  height: 36px;
  margin: 12px 0 0;
  accent-color: var(--bc-accent);
}

.bc-status {
  min-height: 22px;
  margin: 12px 0 18px;
  color: #737b86;
  font-size: 12px;
}

.bc-actions {
  display: flex;
  gap: 12px;
}

.bc-actions button {
  box-sizing: border-box;
  min-height: 44px;
  padding: 10px 20px;
  border: 1px solid #dfe4e8;
  border-radius: 4px;
  cursor: pointer;
  font: inherit;
}

.bc-actions .bc-primary {
  flex: 1;
  border-color: var(--bc-accent);
  background: var(--bc-accent);
  color: #fff;
}

.bc-actions .bc-secondary {
  min-width: 96px;
  background: #fff;
  color: #606773;
}

.bc-actions button:disabled {
  border-color: var(--bc-accent-disabled);
  background: var(--bc-accent-disabled);
  color: #fff;
  cursor: not-allowed;
}

.bc-dialog button:focus,
.bc-board:focus,
.bc-slider:focus {
  outline: 2px solid var(--bc-accent);
  outline-offset: 3px;
}

.bc-actions .bc-primary:hover:not(:disabled) {
  border-color: var(--bc-accent-hover);
  background: var(--bc-accent-hover);
}

.bc-actions .bc-secondary:hover {
  border-color: var(--bc-accent);
  background: var(--bc-accent-soft);
  color: var(--bc-accent);
}

/* 鼠标点击不保留醒目焦点框，键盘操作仍有明确焦点提示。 */
.bc-dialog button:focus:not(:focus-visible) {
  outline: none;
}

@media (max-width: 400px) {
  .bc-dialog {
    padding: 20px;
    border-radius: 16px;
  }
}

.bc-behavior-board {
  cursor: default;
}

.bc-behavior-check {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 76px;
  padding: 16px;
  box-sizing: border-box;
  border: 1px solid #dfe8e8;
  border-radius: 8px;
  background: var(--bc-accent-soft);
  cursor: pointer;
}

.bc-behavior-check .bc-checkbox {
  appearance: auto;
  display: block;
  position: static;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  margin: 0;
  padding: 0;
  opacity: 1;
  accent-color: var(--bc-accent);
  cursor: pointer;
}

.bc-checkbox:focus-visible {
  outline: 2px solid var(--bc-accent);
  outline-offset: 4px;
}

.bc-checkbox:disabled {
  cursor: wait;
}

.bc-check-label {
  color: #2e3033;
  font-size: 16px;
  line-height: 24px;
}
