/* 特别图纸填充 UI */

#ending-fill-panel.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
#ending-fill-panel.hidden { display: none; }

.ef-panel {
  width: min(420px, 88vw);
  background: #2a2030;
  border: 2px solid #a8811f;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: #f0e6d8;
  box-shadow: 0 0 32px rgba(255, 215, 100, 0.25);
}
.ef-panel h2 {
  margin: 0;
  font-size: 18px;
  text-align: center;
  color: #f2c94c;
}
.ef-hint {
  margin: 0;
  font-size: 12px;
  text-align: center;
  color: #b0a0a8;
}
.ef-bar {
  height: 16px;
  background: #1a141f;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #5a4050;
}
.ef-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f2c94c, #ffe38a);
  width: 0%;
  transition: width 0.06s linear;
}
.ef-num {
  text-align: center;
  font-size: 12px;
  color: #d8c8a0;
}
.ef-btn {
  padding: 10px 16px;
  background: #a8811f;
  color: #1a141f;
  border: 0;
  border-radius: 6px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
}
.ef-btn:disabled {
  background: #3a2a38;
  color: #6a5a68;
  cursor: not-allowed;
}
.ef-btn:not(:disabled):hover { background: #c89a30; }
.ef-close {
  padding: 6px 12px;
  background: transparent;
  color: #b0a0a8;
  border: 1px solid #5a4050;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.ef-close:hover { color: #f0e6d8; border-color: #a8811f; }

/* 终局动画 */

#ending-screen.overlay {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: #0a0d24;
  display: flex;
  align-items: center;
  justify-content: center;
}
#ending-screen.hidden { display: none; }

.ending-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.ending-skip-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  padding: 8px 18px;
  background: rgba(30, 20, 10, 0.7);
  color: #d8c8a0;
  border: 1px solid #a8811f;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
}
.ending-skip-btn:hover { background: rgba(60, 40, 20, 0.9); color: #f2c94c; }
.ending-skip-btn.hidden { display: none; }

.ending-end-btn {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  padding: 12px 36px;
  background: #a8811f;
  color: #1a141f;
  border: 0;
  border-radius: 8px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 0 20px rgba(255, 215, 100, 0.4);
}
.ending-end-btn:hover { background: #c89a30; }
.ending-end-btn.hidden { display: none; }